{-# 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.RDS.CreateDBCluster
-- 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 Amazon Aurora DB cluster.
--
-- You can use the @ReplicationSourceIdentifier@ parameter to create the DB
-- cluster as a read replica of another DB cluster or Amazon RDS MySQL or
-- PostgreSQL DB instance. For cross-region replication where the DB
-- cluster identified by @ReplicationSourceIdentifier@ is encrypted, you
-- must also specify the @PreSignedUrl@ parameter.
--
-- For more information on Amazon Aurora, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html What Is Amazon Aurora?>
-- in the /Amazon Aurora User Guide./
--
-- This action only applies to Aurora DB clusters.
module Amazonka.RDS.CreateDBCluster
  ( -- * Creating a Request
    CreateDBCluster (..),
    newCreateDBCluster,

    -- * Request Lenses
    createDBCluster_engineVersion,
    createDBCluster_enableGlobalWriteForwarding,
    createDBCluster_deletionProtection,
    createDBCluster_storageEncrypted,
    createDBCluster_masterUserPassword,
    createDBCluster_replicationSourceIdentifier,
    createDBCluster_enableHttpEndpoint,
    createDBCluster_globalClusterIdentifier,
    createDBCluster_masterUsername,
    createDBCluster_dbSubnetGroupName,
    createDBCluster_domain,
    createDBCluster_backtrackWindow,
    createDBCluster_preSignedUrl,
    createDBCluster_preferredMaintenanceWindow,
    createDBCluster_availabilityZones,
    createDBCluster_destinationRegion,
    createDBCluster_characterSetName,
    createDBCluster_kmsKeyId,
    createDBCluster_preferredBackupWindow,
    createDBCluster_backupRetentionPeriod,
    createDBCluster_vpcSecurityGroupIds,
    createDBCluster_databaseName,
    createDBCluster_dbClusterParameterGroupName,
    createDBCluster_engineMode,
    createDBCluster_scalingConfiguration,
    createDBCluster_optionGroupName,
    createDBCluster_copyTagsToSnapshot,
    createDBCluster_domainIAMRoleName,
    createDBCluster_tags,
    createDBCluster_port,
    createDBCluster_enableIAMDatabaseAuthentication,
    createDBCluster_enableCloudwatchLogsExports,
    createDBCluster_dbClusterIdentifier,
    createDBCluster_engine,

    -- * Destructuring the Response
    CreateDBClusterResponse (..),
    newCreateDBClusterResponse,

    -- * Response Lenses
    createDBClusterResponse_dbCluster,
    createDBClusterResponse_httpStatus,
  )
where

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

-- |
--
-- /See:/ 'newCreateDBCluster' smart constructor.
data CreateDBCluster = CreateDBCluster'
  { -- | The version number of the database engine to use.
    --
    -- To list all of the available engine versions for @aurora@ (for MySQL
    -- 5.6-compatible Aurora), use the following command:
    --
    -- @aws rds describe-db-engine-versions --engine aurora --query \"DBEngineVersions[].EngineVersion\"@
    --
    -- To list all of the available engine versions for @aurora-mysql@ (for
    -- MySQL 5.7-compatible Aurora), use the following command:
    --
    -- @aws rds describe-db-engine-versions --engine aurora-mysql --query \"DBEngineVersions[].EngineVersion\"@
    --
    -- To list all of the available engine versions for @aurora-postgresql@,
    -- use the following command:
    --
    -- @aws rds describe-db-engine-versions --engine aurora-postgresql --query \"DBEngineVersions[].EngineVersion\"@
    --
    -- __Aurora MySQL__
    --
    -- Example: @5.6.10a@, @5.6.mysql_aurora.1.19.2@, @5.7.12@,
    -- @5.7.mysql_aurora.2.04.5@
    --
    -- __Aurora PostgreSQL__
    --
    -- Example: @9.6.3@, @10.7@
    CreateDBCluster -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
    -- | A value that indicates whether to enable this DB cluster to forward
    -- write operations to the primary cluster of an Aurora global database
    -- (GlobalCluster). By default, write operations are not allowed on Aurora
    -- DB clusters that are secondary clusters in an Aurora global database.
    --
    -- You can set this value only on Aurora DB clusters that are members of an
    -- Aurora global database. With this parameter enabled, a secondary cluster
    -- can forward writes to the current primary cluster and the resulting
    -- changes are replicated back to this cluster. For the primary DB cluster
    -- of an Aurora global database, this value is used immediately if the
    -- primary is demoted by the FailoverGlobalCluster API operation, but it
    -- does nothing until then.
    CreateDBCluster -> Maybe Bool
enableGlobalWriteForwarding :: Prelude.Maybe Prelude.Bool,
    -- | A value that indicates whether the DB cluster has deletion protection
    -- enabled. The database can\'t be deleted when deletion protection is
    -- enabled. By default, deletion protection is disabled.
    CreateDBCluster -> Maybe Bool
deletionProtection :: Prelude.Maybe Prelude.Bool,
    -- | A value that indicates whether the DB cluster is encrypted.
    CreateDBCluster -> Maybe Bool
storageEncrypted :: Prelude.Maybe Prelude.Bool,
    -- | The password for the master database user. This password can contain any
    -- printable ASCII character except \"\/\", \"\"\", or \"\@\".
    --
    -- Constraints: Must contain from 8 to 41 characters.
    CreateDBCluster -> Maybe Text
masterUserPassword :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the source DB instance or DB cluster
    -- if this DB cluster is created as a read replica.
    CreateDBCluster -> Maybe Text
replicationSourceIdentifier :: Prelude.Maybe Prelude.Text,
    -- | A value that indicates whether to enable the HTTP endpoint for an Aurora
    -- Serverless DB cluster. By default, the HTTP endpoint is disabled.
    --
    -- When enabled, the HTTP endpoint provides a connectionless web service
    -- API for running SQL queries on the Aurora Serverless DB cluster. You can
    -- also query your database from inside the RDS console with the query
    -- editor.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html Using the Data API for Aurora Serverless>
    -- in the /Amazon Aurora User Guide/.
    CreateDBCluster -> Maybe Bool
enableHttpEndpoint :: Prelude.Maybe Prelude.Bool,
    -- | The global cluster ID of an Aurora cluster that becomes the primary
    -- cluster in the new global database cluster.
    CreateDBCluster -> Maybe Text
globalClusterIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The name of the master user for the DB cluster.
    --
    -- Constraints:
    --
    -- -   Must be 1 to 16 letters or numbers.
    --
    -- -   First character must be a letter.
    --
    -- -   Can\'t be a reserved word for the chosen database engine.
    CreateDBCluster -> Maybe Text
masterUsername :: Prelude.Maybe Prelude.Text,
    -- | A DB subnet group to associate with this DB cluster.
    --
    -- Constraints: Must match the name of an existing DBSubnetGroup. Must not
    -- be default.
    --
    -- Example: @mySubnetgroup@
    CreateDBCluster -> Maybe Text
dbSubnetGroupName :: Prelude.Maybe Prelude.Text,
    -- | The Active Directory directory ID to create the DB cluster in.
    --
    -- For Amazon Aurora DB clusters, Amazon RDS can use Kerberos
    -- Authentication to authenticate users that connect to the DB cluster. For
    -- more information, see
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/kerberos-authentication.html Kerberos Authentication>
    -- in the /Amazon Aurora User Guide/.
    CreateDBCluster -> Maybe Text
domain :: Prelude.Maybe Prelude.Text,
    -- | The target backtrack window, in seconds. To disable backtracking, set
    -- this value to 0.
    --
    -- Currently, Backtrack is only supported for Aurora MySQL DB clusters.
    --
    -- Default: 0
    --
    -- Constraints:
    --
    -- -   If specified, this value must be set to a number from 0 to 259,200
    --     (72 hours).
    CreateDBCluster -> Maybe Integer
backtrackWindow :: Prelude.Maybe Prelude.Integer,
    -- | A URL that contains a Signature Version 4 signed request for the
    -- @CreateDBCluster@ action to be called in the source Amazon Web Services
    -- Region where the DB cluster is replicated from. You only need to specify
    -- @PreSignedUrl@ when you are performing cross-region replication from an
    -- encrypted DB cluster.
    --
    -- The pre-signed URL must be a valid request for the @CreateDBCluster@ API
    -- action that can be executed in the source Amazon Web Services Region
    -- that contains the encrypted DB cluster to be copied.
    --
    -- The pre-signed URL request must contain the following parameter values:
    --
    -- -   @KmsKeyId@ - The Amazon Web Services KMS key identifier for the key
    --     to use to encrypt the copy of the DB cluster in the destination
    --     Amazon Web Services Region. This should refer to the same Amazon Web
    --     Services KMS CMK for both the @CreateDBCluster@ action that is
    --     called in the destination Amazon Web Services Region, and the action
    --     contained in the pre-signed URL.
    --
    -- -   @DestinationRegion@ - The name of the Amazon Web Services Region
    --     that Aurora read replica will be created in.
    --
    -- -   @ReplicationSourceIdentifier@ - The DB cluster identifier for the
    --     encrypted DB cluster to be copied. This identifier must be in the
    --     Amazon Resource Name (ARN) format for the source Amazon Web Services
    --     Region. For example, if you are copying an encrypted DB cluster from
    --     the us-west-2 Amazon Web Services Region, then your
    --     @ReplicationSourceIdentifier@ would look like Example:
    --     @arn:aws:rds:us-west-2:123456789012:cluster:aurora-cluster1@.
    --
    -- To learn how to generate a Signature Version 4 signed request, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4)>
    -- and
    -- <https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html Signature Version 4 Signing Process>.
    --
    -- If you are using an Amazon Web Services SDK tool or the CLI, you can
    -- specify @SourceRegion@ (or @--source-region@ for the CLI) instead of
    -- specifying @PreSignedUrl@ manually. Specifying @SourceRegion@
    -- autogenerates a pre-signed URL that is a valid request for the operation
    -- that can be executed in the source Amazon Web Services Region.
    CreateDBCluster -> Maybe Text
preSignedUrl :: Prelude.Maybe Prelude.Text,
    -- | The weekly time range during which system maintenance can occur, in
    -- Universal Coordinated Time (UTC).
    --
    -- Format: @ddd:hh24:mi-ddd:hh24:mi@
    --
    -- The default is a 30-minute window selected at random from an 8-hour
    -- block of time for each Amazon Web Services Region, occurring on a random
    -- day of the week. To see the time blocks available, see
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow.Aurora Adjusting the Preferred DB Cluster Maintenance Window>
    -- in the /Amazon Aurora User Guide./
    --
    -- Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
    --
    -- Constraints: Minimum 30-minute window.
    CreateDBCluster -> Maybe Text
preferredMaintenanceWindow :: Prelude.Maybe Prelude.Text,
    -- | A list of Availability Zones (AZs) where instances in the DB cluster can
    -- be created. For information on Amazon Web Services Regions and
    -- Availability Zones, see
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.RegionsAndAvailabilityZones.html Choosing the Regions and Availability Zones>
    -- in the /Amazon Aurora User Guide/.
    CreateDBCluster -> Maybe [Text]
availabilityZones :: Prelude.Maybe [Prelude.Text],
    -- | Pseudo-parameter used when populating the @PreSignedUrl@ of a
    -- cross-region @CreateDBCluster@ request. To replicate from region @SRC@
    -- to region @DST@, send a request to region @DST@. In that request, pass a
    -- @PreSignedUrl@ for region @SRC@ with @DestinationRegion@ set to region
    -- @DST@.
    CreateDBCluster -> Maybe Text
destinationRegion :: Prelude.Maybe Prelude.Text,
    -- | A value that indicates that the DB cluster should be associated with the
    -- specified CharacterSet.
    CreateDBCluster -> Maybe Text
characterSetName :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Web Services KMS key identifier for an encrypted DB cluster.
    --
    -- The Amazon Web Services KMS key identifier is the key ARN, key ID, alias
    -- ARN, or alias name for the Amazon Web Services KMS customer master key
    -- (CMK). To use a CMK in a different Amazon Web Services account, specify
    -- the key ARN or alias ARN.
    --
    -- When a CMK isn\'t specified in @KmsKeyId@:
    --
    -- -   If @ReplicationSourceIdentifier@ identifies an encrypted source,
    --     then Amazon RDS will use the CMK used to encrypt the source.
    --     Otherwise, Amazon RDS will use your default CMK.
    --
    -- -   If the @StorageEncrypted@ parameter is enabled and
    --     @ReplicationSourceIdentifier@ isn\'t specified, then Amazon RDS will
    --     use your default CMK.
    --
    -- There is a default CMK for your Amazon Web Services account. Your Amazon
    -- Web Services account has a different default CMK for each Amazon Web
    -- Services Region.
    --
    -- If you create a read replica of an encrypted DB cluster in another
    -- Amazon Web Services Region, you must set @KmsKeyId@ to a Amazon Web
    -- Services KMS key identifier that is valid in the destination Amazon Web
    -- Services Region. This CMK is used to encrypt the read replica in that
    -- Amazon Web Services Region.
    CreateDBCluster -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | The daily time range during which automated backups are created if
    -- automated backups are enabled using the @BackupRetentionPeriod@
    -- parameter.
    --
    -- The default is a 30-minute window selected at random from an 8-hour
    -- block of time for each Amazon Web Services Region. To view the time
    -- blocks available, see
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.html#Aurora.Managing.Backups.BackupWindow Backup window>
    -- in the /Amazon Aurora User Guide./
    --
    -- Constraints:
    --
    -- -   Must be in the format @hh24:mi-hh24:mi@.
    --
    -- -   Must be in Universal Coordinated Time (UTC).
    --
    -- -   Must not conflict with the preferred maintenance window.
    --
    -- -   Must be at least 30 minutes.
    CreateDBCluster -> Maybe Text
preferredBackupWindow :: Prelude.Maybe Prelude.Text,
    -- | The number of days for which automated backups are retained.
    --
    -- Default: 1
    --
    -- Constraints:
    --
    -- -   Must be a value from 1 to 35
    CreateDBCluster -> Maybe Int
backupRetentionPeriod :: Prelude.Maybe Prelude.Int,
    -- | A list of EC2 VPC security groups to associate with this DB cluster.
    CreateDBCluster -> Maybe [Text]
vpcSecurityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | The name for your database of up to 64 alphanumeric characters. If you
    -- do not provide a name, Amazon RDS doesn\'t create a database in the DB
    -- cluster you are creating.
    CreateDBCluster -> Maybe Text
databaseName :: Prelude.Maybe Prelude.Text,
    -- | The name of the DB cluster parameter group to associate with this DB
    -- cluster. If you do not specify a value, then the default DB cluster
    -- parameter group for the specified DB engine and version is used.
    --
    -- Constraints:
    --
    -- -   If supplied, must match the name of an existing DB cluster parameter
    --     group.
    CreateDBCluster -> Maybe Text
dbClusterParameterGroupName :: Prelude.Maybe Prelude.Text,
    -- | The DB engine mode of the DB cluster, either @provisioned@,
    -- @serverless@, @parallelquery@, @global@, or @multimaster@.
    --
    -- The @parallelquery@ engine mode isn\'t required for Aurora MySQL version
    -- 1.23 and higher 1.x versions, and version 2.09 and higher 2.x versions.
    --
    -- The @global@ engine mode isn\'t required for Aurora MySQL version 1.22
    -- and higher 1.x versions, and @global@ engine mode isn\'t required for
    -- any 2.x versions.
    --
    -- The @multimaster@ engine mode only applies for DB clusters created with
    -- Aurora MySQL version 5.6.10a.
    --
    -- For Aurora PostgreSQL, the @global@ engine mode isn\'t required, and
    -- both the @parallelquery@ and the @multimaster@ engine modes currently
    -- aren\'t supported.
    --
    -- Limitations and requirements apply to some DB engine modes. For more
    -- information, see the following sections in the /Amazon Aurora User
    -- Guide/:
    --
    -- -   <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html#aurora-serverless.limitations Limitations of Aurora Serverless>
    --
    -- -   <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-mysql-parallel-query.html#aurora-mysql-parallel-query-limitations Limitations of Parallel Query>
    --
    -- -   <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database.html#aurora-global-database.limitations Limitations of Aurora Global Databases>
    --
    -- -   <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-multi-master.html#aurora-multi-master-limitations Limitations of Multi-Master Clusters>
    CreateDBCluster -> Maybe Text
engineMode :: Prelude.Maybe Prelude.Text,
    -- | For DB clusters in @serverless@ DB engine mode, the scaling properties
    -- of the DB cluster.
    CreateDBCluster -> Maybe ScalingConfiguration
scalingConfiguration :: Prelude.Maybe ScalingConfiguration,
    -- | A value that indicates that the DB cluster should be associated with the
    -- specified option group.
    --
    -- Permanent options can\'t be removed from an option group. The option
    -- group can\'t be removed from a DB cluster once it is associated with a
    -- DB cluster.
    CreateDBCluster -> Maybe Text
optionGroupName :: Prelude.Maybe Prelude.Text,
    -- | A value that indicates whether to copy all tags from the DB cluster to
    -- snapshots of the DB cluster. The default is not to copy them.
    CreateDBCluster -> Maybe Bool
copyTagsToSnapshot :: Prelude.Maybe Prelude.Bool,
    -- | Specify the name of the IAM role to be used when making API calls to the
    -- Directory Service.
    CreateDBCluster -> Maybe Text
domainIAMRoleName :: Prelude.Maybe Prelude.Text,
    -- | Tags to assign to the DB cluster.
    CreateDBCluster -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The port number on which the instances in the DB cluster accept
    -- connections.
    --
    -- Default: @3306@ if engine is set as aurora or @5432@ if set to
    -- aurora-postgresql.
    CreateDBCluster -> Maybe Int
port :: Prelude.Maybe Prelude.Int,
    -- | A value that indicates whether to enable mapping of Amazon Web Services
    -- Identity and Access Management (IAM) accounts to database accounts. By
    -- default, mapping is disabled.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.html IAM Database Authentication>
    -- in the /Amazon Aurora User Guide./
    CreateDBCluster -> Maybe Bool
enableIAMDatabaseAuthentication :: Prelude.Maybe Prelude.Bool,
    -- | The list of log types that need to be enabled for exporting to
    -- CloudWatch Logs. The values in the list depend on the DB engine being
    -- used. For more information, see
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch Publishing Database Logs to Amazon CloudWatch Logs>
    -- in the /Amazon Aurora User Guide/.
    --
    -- __Aurora MySQL__
    --
    -- Possible values are @audit@, @error@, @general@, and @slowquery@.
    --
    -- __Aurora PostgreSQL__
    --
    -- Possible value is @postgresql@.
    CreateDBCluster -> Maybe [Text]
enableCloudwatchLogsExports :: Prelude.Maybe [Prelude.Text],
    -- | The DB cluster identifier. This parameter is stored as a lowercase
    -- string.
    --
    -- Constraints:
    --
    -- -   Must contain from 1 to 63 letters, numbers, or hyphens.
    --
    -- -   First character must be a letter.
    --
    -- -   Can\'t end with a hyphen or contain two consecutive hyphens.
    --
    -- Example: @my-cluster1@
    CreateDBCluster -> Text
dbClusterIdentifier :: Prelude.Text,
    -- | The name of the database engine to be used for this DB cluster.
    --
    -- Valid Values: @aurora@ (for MySQL 5.6-compatible Aurora), @aurora-mysql@
    -- (for MySQL 5.7-compatible Aurora), and @aurora-postgresql@
    CreateDBCluster -> Text
engine :: Prelude.Text
  }
  deriving (CreateDBCluster -> CreateDBCluster -> Bool
(CreateDBCluster -> CreateDBCluster -> Bool)
-> (CreateDBCluster -> CreateDBCluster -> Bool)
-> Eq CreateDBCluster
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDBCluster -> CreateDBCluster -> Bool
$c/= :: CreateDBCluster -> CreateDBCluster -> Bool
== :: CreateDBCluster -> CreateDBCluster -> Bool
$c== :: CreateDBCluster -> CreateDBCluster -> Bool
Prelude.Eq, ReadPrec [CreateDBCluster]
ReadPrec CreateDBCluster
Int -> ReadS CreateDBCluster
ReadS [CreateDBCluster]
(Int -> ReadS CreateDBCluster)
-> ReadS [CreateDBCluster]
-> ReadPrec CreateDBCluster
-> ReadPrec [CreateDBCluster]
-> Read CreateDBCluster
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDBCluster]
$creadListPrec :: ReadPrec [CreateDBCluster]
readPrec :: ReadPrec CreateDBCluster
$creadPrec :: ReadPrec CreateDBCluster
readList :: ReadS [CreateDBCluster]
$creadList :: ReadS [CreateDBCluster]
readsPrec :: Int -> ReadS CreateDBCluster
$creadsPrec :: Int -> ReadS CreateDBCluster
Prelude.Read, Int -> CreateDBCluster -> ShowS
[CreateDBCluster] -> ShowS
CreateDBCluster -> String
(Int -> CreateDBCluster -> ShowS)
-> (CreateDBCluster -> String)
-> ([CreateDBCluster] -> ShowS)
-> Show CreateDBCluster
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDBCluster] -> ShowS
$cshowList :: [CreateDBCluster] -> ShowS
show :: CreateDBCluster -> String
$cshow :: CreateDBCluster -> String
showsPrec :: Int -> CreateDBCluster -> ShowS
$cshowsPrec :: Int -> CreateDBCluster -> ShowS
Prelude.Show, (forall x. CreateDBCluster -> Rep CreateDBCluster x)
-> (forall x. Rep CreateDBCluster x -> CreateDBCluster)
-> Generic CreateDBCluster
forall x. Rep CreateDBCluster x -> CreateDBCluster
forall x. CreateDBCluster -> Rep CreateDBCluster x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDBCluster x -> CreateDBCluster
$cfrom :: forall x. CreateDBCluster -> Rep CreateDBCluster x
Prelude.Generic)

-- |
-- Create a value of 'CreateDBCluster' 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:
--
-- 'engineVersion', 'createDBCluster_engineVersion' - The version number of the database engine to use.
--
-- To list all of the available engine versions for @aurora@ (for MySQL
-- 5.6-compatible Aurora), use the following command:
--
-- @aws rds describe-db-engine-versions --engine aurora --query \"DBEngineVersions[].EngineVersion\"@
--
-- To list all of the available engine versions for @aurora-mysql@ (for
-- MySQL 5.7-compatible Aurora), use the following command:
--
-- @aws rds describe-db-engine-versions --engine aurora-mysql --query \"DBEngineVersions[].EngineVersion\"@
--
-- To list all of the available engine versions for @aurora-postgresql@,
-- use the following command:
--
-- @aws rds describe-db-engine-versions --engine aurora-postgresql --query \"DBEngineVersions[].EngineVersion\"@
--
-- __Aurora MySQL__
--
-- Example: @5.6.10a@, @5.6.mysql_aurora.1.19.2@, @5.7.12@,
-- @5.7.mysql_aurora.2.04.5@
--
-- __Aurora PostgreSQL__
--
-- Example: @9.6.3@, @10.7@
--
-- 'enableGlobalWriteForwarding', 'createDBCluster_enableGlobalWriteForwarding' - A value that indicates whether to enable this DB cluster to forward
-- write operations to the primary cluster of an Aurora global database
-- (GlobalCluster). By default, write operations are not allowed on Aurora
-- DB clusters that are secondary clusters in an Aurora global database.
--
-- You can set this value only on Aurora DB clusters that are members of an
-- Aurora global database. With this parameter enabled, a secondary cluster
-- can forward writes to the current primary cluster and the resulting
-- changes are replicated back to this cluster. For the primary DB cluster
-- of an Aurora global database, this value is used immediately if the
-- primary is demoted by the FailoverGlobalCluster API operation, but it
-- does nothing until then.
--
-- 'deletionProtection', 'createDBCluster_deletionProtection' - A value that indicates whether the DB cluster has deletion protection
-- enabled. The database can\'t be deleted when deletion protection is
-- enabled. By default, deletion protection is disabled.
--
-- 'storageEncrypted', 'createDBCluster_storageEncrypted' - A value that indicates whether the DB cluster is encrypted.
--
-- 'masterUserPassword', 'createDBCluster_masterUserPassword' - The password for the master database user. This password can contain any
-- printable ASCII character except \"\/\", \"\"\", or \"\@\".
--
-- Constraints: Must contain from 8 to 41 characters.
--
-- 'replicationSourceIdentifier', 'createDBCluster_replicationSourceIdentifier' - The Amazon Resource Name (ARN) of the source DB instance or DB cluster
-- if this DB cluster is created as a read replica.
--
-- 'enableHttpEndpoint', 'createDBCluster_enableHttpEndpoint' - A value that indicates whether to enable the HTTP endpoint for an Aurora
-- Serverless DB cluster. By default, the HTTP endpoint is disabled.
--
-- When enabled, the HTTP endpoint provides a connectionless web service
-- API for running SQL queries on the Aurora Serverless DB cluster. You can
-- also query your database from inside the RDS console with the query
-- editor.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html Using the Data API for Aurora Serverless>
-- in the /Amazon Aurora User Guide/.
--
-- 'globalClusterIdentifier', 'createDBCluster_globalClusterIdentifier' - The global cluster ID of an Aurora cluster that becomes the primary
-- cluster in the new global database cluster.
--
-- 'masterUsername', 'createDBCluster_masterUsername' - The name of the master user for the DB cluster.
--
-- Constraints:
--
-- -   Must be 1 to 16 letters or numbers.
--
-- -   First character must be a letter.
--
-- -   Can\'t be a reserved word for the chosen database engine.
--
-- 'dbSubnetGroupName', 'createDBCluster_dbSubnetGroupName' - A DB subnet group to associate with this DB cluster.
--
-- Constraints: Must match the name of an existing DBSubnetGroup. Must not
-- be default.
--
-- Example: @mySubnetgroup@
--
-- 'domain', 'createDBCluster_domain' - The Active Directory directory ID to create the DB cluster in.
--
-- For Amazon Aurora DB clusters, Amazon RDS can use Kerberos
-- Authentication to authenticate users that connect to the DB cluster. For
-- more information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/kerberos-authentication.html Kerberos Authentication>
-- in the /Amazon Aurora User Guide/.
--
-- 'backtrackWindow', 'createDBCluster_backtrackWindow' - The target backtrack window, in seconds. To disable backtracking, set
-- this value to 0.
--
-- Currently, Backtrack is only supported for Aurora MySQL DB clusters.
--
-- Default: 0
--
-- Constraints:
--
-- -   If specified, this value must be set to a number from 0 to 259,200
--     (72 hours).
--
-- 'preSignedUrl', 'createDBCluster_preSignedUrl' - A URL that contains a Signature Version 4 signed request for the
-- @CreateDBCluster@ action to be called in the source Amazon Web Services
-- Region where the DB cluster is replicated from. You only need to specify
-- @PreSignedUrl@ when you are performing cross-region replication from an
-- encrypted DB cluster.
--
-- The pre-signed URL must be a valid request for the @CreateDBCluster@ API
-- action that can be executed in the source Amazon Web Services Region
-- that contains the encrypted DB cluster to be copied.
--
-- The pre-signed URL request must contain the following parameter values:
--
-- -   @KmsKeyId@ - The Amazon Web Services KMS key identifier for the key
--     to use to encrypt the copy of the DB cluster in the destination
--     Amazon Web Services Region. This should refer to the same Amazon Web
--     Services KMS CMK for both the @CreateDBCluster@ action that is
--     called in the destination Amazon Web Services Region, and the action
--     contained in the pre-signed URL.
--
-- -   @DestinationRegion@ - The name of the Amazon Web Services Region
--     that Aurora read replica will be created in.
--
-- -   @ReplicationSourceIdentifier@ - The DB cluster identifier for the
--     encrypted DB cluster to be copied. This identifier must be in the
--     Amazon Resource Name (ARN) format for the source Amazon Web Services
--     Region. For example, if you are copying an encrypted DB cluster from
--     the us-west-2 Amazon Web Services Region, then your
--     @ReplicationSourceIdentifier@ would look like Example:
--     @arn:aws:rds:us-west-2:123456789012:cluster:aurora-cluster1@.
--
-- To learn how to generate a Signature Version 4 signed request, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4)>
-- and
-- <https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html Signature Version 4 Signing Process>.
--
-- If you are using an Amazon Web Services SDK tool or the CLI, you can
-- specify @SourceRegion@ (or @--source-region@ for the CLI) instead of
-- specifying @PreSignedUrl@ manually. Specifying @SourceRegion@
-- autogenerates a pre-signed URL that is a valid request for the operation
-- that can be executed in the source Amazon Web Services Region.
--
-- 'preferredMaintenanceWindow', 'createDBCluster_preferredMaintenanceWindow' - The weekly time range during which system maintenance can occur, in
-- Universal Coordinated Time (UTC).
--
-- Format: @ddd:hh24:mi-ddd:hh24:mi@
--
-- The default is a 30-minute window selected at random from an 8-hour
-- block of time for each Amazon Web Services Region, occurring on a random
-- day of the week. To see the time blocks available, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow.Aurora Adjusting the Preferred DB Cluster Maintenance Window>
-- in the /Amazon Aurora User Guide./
--
-- Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
--
-- Constraints: Minimum 30-minute window.
--
-- 'availabilityZones', 'createDBCluster_availabilityZones' - A list of Availability Zones (AZs) where instances in the DB cluster can
-- be created. For information on Amazon Web Services Regions and
-- Availability Zones, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.RegionsAndAvailabilityZones.html Choosing the Regions and Availability Zones>
-- in the /Amazon Aurora User Guide/.
--
-- 'destinationRegion', 'createDBCluster_destinationRegion' - Pseudo-parameter used when populating the @PreSignedUrl@ of a
-- cross-region @CreateDBCluster@ request. To replicate from region @SRC@
-- to region @DST@, send a request to region @DST@. In that request, pass a
-- @PreSignedUrl@ for region @SRC@ with @DestinationRegion@ set to region
-- @DST@.
--
-- 'characterSetName', 'createDBCluster_characterSetName' - A value that indicates that the DB cluster should be associated with the
-- specified CharacterSet.
--
-- 'kmsKeyId', 'createDBCluster_kmsKeyId' - The Amazon Web Services KMS key identifier for an encrypted DB cluster.
--
-- The Amazon Web Services KMS key identifier is the key ARN, key ID, alias
-- ARN, or alias name for the Amazon Web Services KMS customer master key
-- (CMK). To use a CMK in a different Amazon Web Services account, specify
-- the key ARN or alias ARN.
--
-- When a CMK isn\'t specified in @KmsKeyId@:
--
-- -   If @ReplicationSourceIdentifier@ identifies an encrypted source,
--     then Amazon RDS will use the CMK used to encrypt the source.
--     Otherwise, Amazon RDS will use your default CMK.
--
-- -   If the @StorageEncrypted@ parameter is enabled and
--     @ReplicationSourceIdentifier@ isn\'t specified, then Amazon RDS will
--     use your default CMK.
--
-- There is a default CMK for your Amazon Web Services account. Your Amazon
-- Web Services account has a different default CMK for each Amazon Web
-- Services Region.
--
-- If you create a read replica of an encrypted DB cluster in another
-- Amazon Web Services Region, you must set @KmsKeyId@ to a Amazon Web
-- Services KMS key identifier that is valid in the destination Amazon Web
-- Services Region. This CMK is used to encrypt the read replica in that
-- Amazon Web Services Region.
--
-- 'preferredBackupWindow', 'createDBCluster_preferredBackupWindow' - The daily time range during which automated backups are created if
-- automated backups are enabled using the @BackupRetentionPeriod@
-- parameter.
--
-- The default is a 30-minute window selected at random from an 8-hour
-- block of time for each Amazon Web Services Region. To view the time
-- blocks available, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.html#Aurora.Managing.Backups.BackupWindow Backup window>
-- in the /Amazon Aurora User Guide./
--
-- Constraints:
--
-- -   Must be in the format @hh24:mi-hh24:mi@.
--
-- -   Must be in Universal Coordinated Time (UTC).
--
-- -   Must not conflict with the preferred maintenance window.
--
-- -   Must be at least 30 minutes.
--
-- 'backupRetentionPeriod', 'createDBCluster_backupRetentionPeriod' - The number of days for which automated backups are retained.
--
-- Default: 1
--
-- Constraints:
--
-- -   Must be a value from 1 to 35
--
-- 'vpcSecurityGroupIds', 'createDBCluster_vpcSecurityGroupIds' - A list of EC2 VPC security groups to associate with this DB cluster.
--
-- 'databaseName', 'createDBCluster_databaseName' - The name for your database of up to 64 alphanumeric characters. If you
-- do not provide a name, Amazon RDS doesn\'t create a database in the DB
-- cluster you are creating.
--
-- 'dbClusterParameterGroupName', 'createDBCluster_dbClusterParameterGroupName' - The name of the DB cluster parameter group to associate with this DB
-- cluster. If you do not specify a value, then the default DB cluster
-- parameter group for the specified DB engine and version is used.
--
-- Constraints:
--
-- -   If supplied, must match the name of an existing DB cluster parameter
--     group.
--
-- 'engineMode', 'createDBCluster_engineMode' - The DB engine mode of the DB cluster, either @provisioned@,
-- @serverless@, @parallelquery@, @global@, or @multimaster@.
--
-- The @parallelquery@ engine mode isn\'t required for Aurora MySQL version
-- 1.23 and higher 1.x versions, and version 2.09 and higher 2.x versions.
--
-- The @global@ engine mode isn\'t required for Aurora MySQL version 1.22
-- and higher 1.x versions, and @global@ engine mode isn\'t required for
-- any 2.x versions.
--
-- The @multimaster@ engine mode only applies for DB clusters created with
-- Aurora MySQL version 5.6.10a.
--
-- For Aurora PostgreSQL, the @global@ engine mode isn\'t required, and
-- both the @parallelquery@ and the @multimaster@ engine modes currently
-- aren\'t supported.
--
-- Limitations and requirements apply to some DB engine modes. For more
-- information, see the following sections in the /Amazon Aurora User
-- Guide/:
--
-- -   <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html#aurora-serverless.limitations Limitations of Aurora Serverless>
--
-- -   <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-mysql-parallel-query.html#aurora-mysql-parallel-query-limitations Limitations of Parallel Query>
--
-- -   <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database.html#aurora-global-database.limitations Limitations of Aurora Global Databases>
--
-- -   <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-multi-master.html#aurora-multi-master-limitations Limitations of Multi-Master Clusters>
--
-- 'scalingConfiguration', 'createDBCluster_scalingConfiguration' - For DB clusters in @serverless@ DB engine mode, the scaling properties
-- of the DB cluster.
--
-- 'optionGroupName', 'createDBCluster_optionGroupName' - A value that indicates that the DB cluster should be associated with the
-- specified option group.
--
-- Permanent options can\'t be removed from an option group. The option
-- group can\'t be removed from a DB cluster once it is associated with a
-- DB cluster.
--
-- 'copyTagsToSnapshot', 'createDBCluster_copyTagsToSnapshot' - A value that indicates whether to copy all tags from the DB cluster to
-- snapshots of the DB cluster. The default is not to copy them.
--
-- 'domainIAMRoleName', 'createDBCluster_domainIAMRoleName' - Specify the name of the IAM role to be used when making API calls to the
-- Directory Service.
--
-- 'tags', 'createDBCluster_tags' - Tags to assign to the DB cluster.
--
-- 'port', 'createDBCluster_port' - The port number on which the instances in the DB cluster accept
-- connections.
--
-- Default: @3306@ if engine is set as aurora or @5432@ if set to
-- aurora-postgresql.
--
-- 'enableIAMDatabaseAuthentication', 'createDBCluster_enableIAMDatabaseAuthentication' - A value that indicates whether to enable mapping of Amazon Web Services
-- Identity and Access Management (IAM) accounts to database accounts. By
-- default, mapping is disabled.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.html IAM Database Authentication>
-- in the /Amazon Aurora User Guide./
--
-- 'enableCloudwatchLogsExports', 'createDBCluster_enableCloudwatchLogsExports' - The list of log types that need to be enabled for exporting to
-- CloudWatch Logs. The values in the list depend on the DB engine being
-- used. For more information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch Publishing Database Logs to Amazon CloudWatch Logs>
-- in the /Amazon Aurora User Guide/.
--
-- __Aurora MySQL__
--
-- Possible values are @audit@, @error@, @general@, and @slowquery@.
--
-- __Aurora PostgreSQL__
--
-- Possible value is @postgresql@.
--
-- 'dbClusterIdentifier', 'createDBCluster_dbClusterIdentifier' - The DB cluster identifier. This parameter is stored as a lowercase
-- string.
--
-- Constraints:
--
-- -   Must contain from 1 to 63 letters, numbers, or hyphens.
--
-- -   First character must be a letter.
--
-- -   Can\'t end with a hyphen or contain two consecutive hyphens.
--
-- Example: @my-cluster1@
--
-- 'engine', 'createDBCluster_engine' - The name of the database engine to be used for this DB cluster.
--
-- Valid Values: @aurora@ (for MySQL 5.6-compatible Aurora), @aurora-mysql@
-- (for MySQL 5.7-compatible Aurora), and @aurora-postgresql@
newCreateDBCluster ::
  -- | 'dbClusterIdentifier'
  Prelude.Text ->
  -- | 'engine'
  Prelude.Text ->
  CreateDBCluster
newCreateDBCluster :: Text -> Text -> CreateDBCluster
newCreateDBCluster Text
pDBClusterIdentifier_ Text
pEngine_ =
  CreateDBCluster' :: Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ScalingConfiguration
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [Tag]
-> Maybe Int
-> Maybe Bool
-> Maybe [Text]
-> Text
-> Text
-> CreateDBCluster
CreateDBCluster'
    { $sel:engineVersion:CreateDBCluster' :: Maybe Text
engineVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:enableGlobalWriteForwarding:CreateDBCluster' :: Maybe Bool
enableGlobalWriteForwarding = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:deletionProtection:CreateDBCluster' :: Maybe Bool
deletionProtection = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:storageEncrypted:CreateDBCluster' :: Maybe Bool
storageEncrypted = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:masterUserPassword:CreateDBCluster' :: Maybe Text
masterUserPassword = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationSourceIdentifier:CreateDBCluster' :: Maybe Text
replicationSourceIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:enableHttpEndpoint:CreateDBCluster' :: Maybe Bool
enableHttpEndpoint = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:globalClusterIdentifier:CreateDBCluster' :: Maybe Text
globalClusterIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:masterUsername:CreateDBCluster' :: Maybe Text
masterUsername = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dbSubnetGroupName:CreateDBCluster' :: Maybe Text
dbSubnetGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:domain:CreateDBCluster' :: Maybe Text
domain = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backtrackWindow:CreateDBCluster' :: Maybe Integer
backtrackWindow = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:preSignedUrl:CreateDBCluster' :: Maybe Text
preSignedUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:preferredMaintenanceWindow:CreateDBCluster' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:availabilityZones:CreateDBCluster' :: Maybe [Text]
availabilityZones = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:destinationRegion:CreateDBCluster' :: Maybe Text
destinationRegion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:characterSetName:CreateDBCluster' :: Maybe Text
characterSetName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:kmsKeyId:CreateDBCluster' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:preferredBackupWindow:CreateDBCluster' :: Maybe Text
preferredBackupWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backupRetentionPeriod:CreateDBCluster' :: Maybe Int
backupRetentionPeriod = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcSecurityGroupIds:CreateDBCluster' :: Maybe [Text]
vpcSecurityGroupIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:databaseName:CreateDBCluster' :: Maybe Text
databaseName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dbClusterParameterGroupName:CreateDBCluster' :: Maybe Text
dbClusterParameterGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:engineMode:CreateDBCluster' :: Maybe Text
engineMode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:scalingConfiguration:CreateDBCluster' :: Maybe ScalingConfiguration
scalingConfiguration = Maybe ScalingConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:optionGroupName:CreateDBCluster' :: Maybe Text
optionGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:copyTagsToSnapshot:CreateDBCluster' :: Maybe Bool
copyTagsToSnapshot = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:domainIAMRoleName:CreateDBCluster' :: Maybe Text
domainIAMRoleName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateDBCluster' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:port:CreateDBCluster' :: Maybe Int
port = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:enableIAMDatabaseAuthentication:CreateDBCluster' :: Maybe Bool
enableIAMDatabaseAuthentication = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:enableCloudwatchLogsExports:CreateDBCluster' :: Maybe [Text]
enableCloudwatchLogsExports = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:dbClusterIdentifier:CreateDBCluster' :: Text
dbClusterIdentifier = Text
pDBClusterIdentifier_,
      $sel:engine:CreateDBCluster' :: Text
engine = Text
pEngine_
    }

-- | The version number of the database engine to use.
--
-- To list all of the available engine versions for @aurora@ (for MySQL
-- 5.6-compatible Aurora), use the following command:
--
-- @aws rds describe-db-engine-versions --engine aurora --query \"DBEngineVersions[].EngineVersion\"@
--
-- To list all of the available engine versions for @aurora-mysql@ (for
-- MySQL 5.7-compatible Aurora), use the following command:
--
-- @aws rds describe-db-engine-versions --engine aurora-mysql --query \"DBEngineVersions[].EngineVersion\"@
--
-- To list all of the available engine versions for @aurora-postgresql@,
-- use the following command:
--
-- @aws rds describe-db-engine-versions --engine aurora-postgresql --query \"DBEngineVersions[].EngineVersion\"@
--
-- __Aurora MySQL__
--
-- Example: @5.6.10a@, @5.6.mysql_aurora.1.19.2@, @5.7.12@,
-- @5.7.mysql_aurora.2.04.5@
--
-- __Aurora PostgreSQL__
--
-- Example: @9.6.3@, @10.7@
createDBCluster_engineVersion :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Text)
createDBCluster_engineVersion :: (Maybe Text -> f (Maybe Text))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_engineVersion = (CreateDBCluster -> Maybe Text)
-> (CreateDBCluster -> Maybe Text -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:CreateDBCluster' :: CreateDBCluster -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Text
a -> CreateDBCluster
s {$sel:engineVersion:CreateDBCluster' :: Maybe Text
engineVersion = Maybe Text
a} :: CreateDBCluster)

-- | A value that indicates whether to enable this DB cluster to forward
-- write operations to the primary cluster of an Aurora global database
-- (GlobalCluster). By default, write operations are not allowed on Aurora
-- DB clusters that are secondary clusters in an Aurora global database.
--
-- You can set this value only on Aurora DB clusters that are members of an
-- Aurora global database. With this parameter enabled, a secondary cluster
-- can forward writes to the current primary cluster and the resulting
-- changes are replicated back to this cluster. For the primary DB cluster
-- of an Aurora global database, this value is used immediately if the
-- primary is demoted by the FailoverGlobalCluster API operation, but it
-- does nothing until then.
createDBCluster_enableGlobalWriteForwarding :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Bool)
createDBCluster_enableGlobalWriteForwarding :: (Maybe Bool -> f (Maybe Bool))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_enableGlobalWriteForwarding = (CreateDBCluster -> Maybe Bool)
-> (CreateDBCluster -> Maybe Bool -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Bool
enableGlobalWriteForwarding :: Maybe Bool
$sel:enableGlobalWriteForwarding:CreateDBCluster' :: CreateDBCluster -> Maybe Bool
enableGlobalWriteForwarding} -> Maybe Bool
enableGlobalWriteForwarding) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Bool
a -> CreateDBCluster
s {$sel:enableGlobalWriteForwarding:CreateDBCluster' :: Maybe Bool
enableGlobalWriteForwarding = Maybe Bool
a} :: CreateDBCluster)

-- | A value that indicates whether the DB cluster has deletion protection
-- enabled. The database can\'t be deleted when deletion protection is
-- enabled. By default, deletion protection is disabled.
createDBCluster_deletionProtection :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Bool)
createDBCluster_deletionProtection :: (Maybe Bool -> f (Maybe Bool))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_deletionProtection = (CreateDBCluster -> Maybe Bool)
-> (CreateDBCluster -> Maybe Bool -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Bool
deletionProtection :: Maybe Bool
$sel:deletionProtection:CreateDBCluster' :: CreateDBCluster -> Maybe Bool
deletionProtection} -> Maybe Bool
deletionProtection) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Bool
a -> CreateDBCluster
s {$sel:deletionProtection:CreateDBCluster' :: Maybe Bool
deletionProtection = Maybe Bool
a} :: CreateDBCluster)

-- | A value that indicates whether the DB cluster is encrypted.
createDBCluster_storageEncrypted :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Bool)
createDBCluster_storageEncrypted :: (Maybe Bool -> f (Maybe Bool))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_storageEncrypted = (CreateDBCluster -> Maybe Bool)
-> (CreateDBCluster -> Maybe Bool -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Bool
storageEncrypted :: Maybe Bool
$sel:storageEncrypted:CreateDBCluster' :: CreateDBCluster -> Maybe Bool
storageEncrypted} -> Maybe Bool
storageEncrypted) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Bool
a -> CreateDBCluster
s {$sel:storageEncrypted:CreateDBCluster' :: Maybe Bool
storageEncrypted = Maybe Bool
a} :: CreateDBCluster)

-- | The password for the master database user. This password can contain any
-- printable ASCII character except \"\/\", \"\"\", or \"\@\".
--
-- Constraints: Must contain from 8 to 41 characters.
createDBCluster_masterUserPassword :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Text)
createDBCluster_masterUserPassword :: (Maybe Text -> f (Maybe Text))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_masterUserPassword = (CreateDBCluster -> Maybe Text)
-> (CreateDBCluster -> Maybe Text -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Text
masterUserPassword :: Maybe Text
$sel:masterUserPassword:CreateDBCluster' :: CreateDBCluster -> Maybe Text
masterUserPassword} -> Maybe Text
masterUserPassword) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Text
a -> CreateDBCluster
s {$sel:masterUserPassword:CreateDBCluster' :: Maybe Text
masterUserPassword = Maybe Text
a} :: CreateDBCluster)

-- | The Amazon Resource Name (ARN) of the source DB instance or DB cluster
-- if this DB cluster is created as a read replica.
createDBCluster_replicationSourceIdentifier :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Text)
createDBCluster_replicationSourceIdentifier :: (Maybe Text -> f (Maybe Text))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_replicationSourceIdentifier = (CreateDBCluster -> Maybe Text)
-> (CreateDBCluster -> Maybe Text -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Text
replicationSourceIdentifier :: Maybe Text
$sel:replicationSourceIdentifier:CreateDBCluster' :: CreateDBCluster -> Maybe Text
replicationSourceIdentifier} -> Maybe Text
replicationSourceIdentifier) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Text
a -> CreateDBCluster
s {$sel:replicationSourceIdentifier:CreateDBCluster' :: Maybe Text
replicationSourceIdentifier = Maybe Text
a} :: CreateDBCluster)

-- | A value that indicates whether to enable the HTTP endpoint for an Aurora
-- Serverless DB cluster. By default, the HTTP endpoint is disabled.
--
-- When enabled, the HTTP endpoint provides a connectionless web service
-- API for running SQL queries on the Aurora Serverless DB cluster. You can
-- also query your database from inside the RDS console with the query
-- editor.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html Using the Data API for Aurora Serverless>
-- in the /Amazon Aurora User Guide/.
createDBCluster_enableHttpEndpoint :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Bool)
createDBCluster_enableHttpEndpoint :: (Maybe Bool -> f (Maybe Bool))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_enableHttpEndpoint = (CreateDBCluster -> Maybe Bool)
-> (CreateDBCluster -> Maybe Bool -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Bool
enableHttpEndpoint :: Maybe Bool
$sel:enableHttpEndpoint:CreateDBCluster' :: CreateDBCluster -> Maybe Bool
enableHttpEndpoint} -> Maybe Bool
enableHttpEndpoint) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Bool
a -> CreateDBCluster
s {$sel:enableHttpEndpoint:CreateDBCluster' :: Maybe Bool
enableHttpEndpoint = Maybe Bool
a} :: CreateDBCluster)

-- | The global cluster ID of an Aurora cluster that becomes the primary
-- cluster in the new global database cluster.
createDBCluster_globalClusterIdentifier :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Text)
createDBCluster_globalClusterIdentifier :: (Maybe Text -> f (Maybe Text))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_globalClusterIdentifier = (CreateDBCluster -> Maybe Text)
-> (CreateDBCluster -> Maybe Text -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Text
globalClusterIdentifier :: Maybe Text
$sel:globalClusterIdentifier:CreateDBCluster' :: CreateDBCluster -> Maybe Text
globalClusterIdentifier} -> Maybe Text
globalClusterIdentifier) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Text
a -> CreateDBCluster
s {$sel:globalClusterIdentifier:CreateDBCluster' :: Maybe Text
globalClusterIdentifier = Maybe Text
a} :: CreateDBCluster)

-- | The name of the master user for the DB cluster.
--
-- Constraints:
--
-- -   Must be 1 to 16 letters or numbers.
--
-- -   First character must be a letter.
--
-- -   Can\'t be a reserved word for the chosen database engine.
createDBCluster_masterUsername :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Text)
createDBCluster_masterUsername :: (Maybe Text -> f (Maybe Text))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_masterUsername = (CreateDBCluster -> Maybe Text)
-> (CreateDBCluster -> Maybe Text -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Text
masterUsername :: Maybe Text
$sel:masterUsername:CreateDBCluster' :: CreateDBCluster -> Maybe Text
masterUsername} -> Maybe Text
masterUsername) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Text
a -> CreateDBCluster
s {$sel:masterUsername:CreateDBCluster' :: Maybe Text
masterUsername = Maybe Text
a} :: CreateDBCluster)

-- | A DB subnet group to associate with this DB cluster.
--
-- Constraints: Must match the name of an existing DBSubnetGroup. Must not
-- be default.
--
-- Example: @mySubnetgroup@
createDBCluster_dbSubnetGroupName :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Text)
createDBCluster_dbSubnetGroupName :: (Maybe Text -> f (Maybe Text))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_dbSubnetGroupName = (CreateDBCluster -> Maybe Text)
-> (CreateDBCluster -> Maybe Text -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Text
dbSubnetGroupName :: Maybe Text
$sel:dbSubnetGroupName:CreateDBCluster' :: CreateDBCluster -> Maybe Text
dbSubnetGroupName} -> Maybe Text
dbSubnetGroupName) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Text
a -> CreateDBCluster
s {$sel:dbSubnetGroupName:CreateDBCluster' :: Maybe Text
dbSubnetGroupName = Maybe Text
a} :: CreateDBCluster)

-- | The Active Directory directory ID to create the DB cluster in.
--
-- For Amazon Aurora DB clusters, Amazon RDS can use Kerberos
-- Authentication to authenticate users that connect to the DB cluster. For
-- more information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/kerberos-authentication.html Kerberos Authentication>
-- in the /Amazon Aurora User Guide/.
createDBCluster_domain :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Text)
createDBCluster_domain :: (Maybe Text -> f (Maybe Text))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_domain = (CreateDBCluster -> Maybe Text)
-> (CreateDBCluster -> Maybe Text -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Text
domain :: Maybe Text
$sel:domain:CreateDBCluster' :: CreateDBCluster -> Maybe Text
domain} -> Maybe Text
domain) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Text
a -> CreateDBCluster
s {$sel:domain:CreateDBCluster' :: Maybe Text
domain = Maybe Text
a} :: CreateDBCluster)

-- | The target backtrack window, in seconds. To disable backtracking, set
-- this value to 0.
--
-- Currently, Backtrack is only supported for Aurora MySQL DB clusters.
--
-- Default: 0
--
-- Constraints:
--
-- -   If specified, this value must be set to a number from 0 to 259,200
--     (72 hours).
createDBCluster_backtrackWindow :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Integer)
createDBCluster_backtrackWindow :: (Maybe Integer -> f (Maybe Integer))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_backtrackWindow = (CreateDBCluster -> Maybe Integer)
-> (CreateDBCluster -> Maybe Integer -> CreateDBCluster)
-> Lens
     CreateDBCluster CreateDBCluster (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Integer
backtrackWindow :: Maybe Integer
$sel:backtrackWindow:CreateDBCluster' :: CreateDBCluster -> Maybe Integer
backtrackWindow} -> Maybe Integer
backtrackWindow) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Integer
a -> CreateDBCluster
s {$sel:backtrackWindow:CreateDBCluster' :: Maybe Integer
backtrackWindow = Maybe Integer
a} :: CreateDBCluster)

-- | A URL that contains a Signature Version 4 signed request for the
-- @CreateDBCluster@ action to be called in the source Amazon Web Services
-- Region where the DB cluster is replicated from. You only need to specify
-- @PreSignedUrl@ when you are performing cross-region replication from an
-- encrypted DB cluster.
--
-- The pre-signed URL must be a valid request for the @CreateDBCluster@ API
-- action that can be executed in the source Amazon Web Services Region
-- that contains the encrypted DB cluster to be copied.
--
-- The pre-signed URL request must contain the following parameter values:
--
-- -   @KmsKeyId@ - The Amazon Web Services KMS key identifier for the key
--     to use to encrypt the copy of the DB cluster in the destination
--     Amazon Web Services Region. This should refer to the same Amazon Web
--     Services KMS CMK for both the @CreateDBCluster@ action that is
--     called in the destination Amazon Web Services Region, and the action
--     contained in the pre-signed URL.
--
-- -   @DestinationRegion@ - The name of the Amazon Web Services Region
--     that Aurora read replica will be created in.
--
-- -   @ReplicationSourceIdentifier@ - The DB cluster identifier for the
--     encrypted DB cluster to be copied. This identifier must be in the
--     Amazon Resource Name (ARN) format for the source Amazon Web Services
--     Region. For example, if you are copying an encrypted DB cluster from
--     the us-west-2 Amazon Web Services Region, then your
--     @ReplicationSourceIdentifier@ would look like Example:
--     @arn:aws:rds:us-west-2:123456789012:cluster:aurora-cluster1@.
--
-- To learn how to generate a Signature Version 4 signed request, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4)>
-- and
-- <https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html Signature Version 4 Signing Process>.
--
-- If you are using an Amazon Web Services SDK tool or the CLI, you can
-- specify @SourceRegion@ (or @--source-region@ for the CLI) instead of
-- specifying @PreSignedUrl@ manually. Specifying @SourceRegion@
-- autogenerates a pre-signed URL that is a valid request for the operation
-- that can be executed in the source Amazon Web Services Region.
createDBCluster_preSignedUrl :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Text)
createDBCluster_preSignedUrl :: (Maybe Text -> f (Maybe Text))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_preSignedUrl = (CreateDBCluster -> Maybe Text)
-> (CreateDBCluster -> Maybe Text -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Text
preSignedUrl :: Maybe Text
$sel:preSignedUrl:CreateDBCluster' :: CreateDBCluster -> Maybe Text
preSignedUrl} -> Maybe Text
preSignedUrl) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Text
a -> CreateDBCluster
s {$sel:preSignedUrl:CreateDBCluster' :: Maybe Text
preSignedUrl = Maybe Text
a} :: CreateDBCluster)

-- | The weekly time range during which system maintenance can occur, in
-- Universal Coordinated Time (UTC).
--
-- Format: @ddd:hh24:mi-ddd:hh24:mi@
--
-- The default is a 30-minute window selected at random from an 8-hour
-- block of time for each Amazon Web Services Region, occurring on a random
-- day of the week. To see the time blocks available, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow.Aurora Adjusting the Preferred DB Cluster Maintenance Window>
-- in the /Amazon Aurora User Guide./
--
-- Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
--
-- Constraints: Minimum 30-minute window.
createDBCluster_preferredMaintenanceWindow :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Text)
createDBCluster_preferredMaintenanceWindow :: (Maybe Text -> f (Maybe Text))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_preferredMaintenanceWindow = (CreateDBCluster -> Maybe Text)
-> (CreateDBCluster -> Maybe Text -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Text
preferredMaintenanceWindow :: Maybe Text
$sel:preferredMaintenanceWindow:CreateDBCluster' :: CreateDBCluster -> Maybe Text
preferredMaintenanceWindow} -> Maybe Text
preferredMaintenanceWindow) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Text
a -> CreateDBCluster
s {$sel:preferredMaintenanceWindow:CreateDBCluster' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
a} :: CreateDBCluster)

-- | A list of Availability Zones (AZs) where instances in the DB cluster can
-- be created. For information on Amazon Web Services Regions and
-- Availability Zones, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.RegionsAndAvailabilityZones.html Choosing the Regions and Availability Zones>
-- in the /Amazon Aurora User Guide/.
createDBCluster_availabilityZones :: Lens.Lens' CreateDBCluster (Prelude.Maybe [Prelude.Text])
createDBCluster_availabilityZones :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_availabilityZones = (CreateDBCluster -> Maybe [Text])
-> (CreateDBCluster -> Maybe [Text] -> CreateDBCluster)
-> Lens
     CreateDBCluster CreateDBCluster (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe [Text]
availabilityZones :: Maybe [Text]
$sel:availabilityZones:CreateDBCluster' :: CreateDBCluster -> Maybe [Text]
availabilityZones} -> Maybe [Text]
availabilityZones) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe [Text]
a -> CreateDBCluster
s {$sel:availabilityZones:CreateDBCluster' :: Maybe [Text]
availabilityZones = Maybe [Text]
a} :: CreateDBCluster) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateDBCluster -> f CreateDBCluster)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateDBCluster
-> f CreateDBCluster
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

-- | Pseudo-parameter used when populating the @PreSignedUrl@ of a
-- cross-region @CreateDBCluster@ request. To replicate from region @SRC@
-- to region @DST@, send a request to region @DST@. In that request, pass a
-- @PreSignedUrl@ for region @SRC@ with @DestinationRegion@ set to region
-- @DST@.
createDBCluster_destinationRegion :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Text)
createDBCluster_destinationRegion :: (Maybe Text -> f (Maybe Text))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_destinationRegion = (CreateDBCluster -> Maybe Text)
-> (CreateDBCluster -> Maybe Text -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Text
destinationRegion :: Maybe Text
$sel:destinationRegion:CreateDBCluster' :: CreateDBCluster -> Maybe Text
destinationRegion} -> Maybe Text
destinationRegion) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Text
a -> CreateDBCluster
s {$sel:destinationRegion:CreateDBCluster' :: Maybe Text
destinationRegion = Maybe Text
a} :: CreateDBCluster)

-- | A value that indicates that the DB cluster should be associated with the
-- specified CharacterSet.
createDBCluster_characterSetName :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Text)
createDBCluster_characterSetName :: (Maybe Text -> f (Maybe Text))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_characterSetName = (CreateDBCluster -> Maybe Text)
-> (CreateDBCluster -> Maybe Text -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Text
characterSetName :: Maybe Text
$sel:characterSetName:CreateDBCluster' :: CreateDBCluster -> Maybe Text
characterSetName} -> Maybe Text
characterSetName) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Text
a -> CreateDBCluster
s {$sel:characterSetName:CreateDBCluster' :: Maybe Text
characterSetName = Maybe Text
a} :: CreateDBCluster)

-- | The Amazon Web Services KMS key identifier for an encrypted DB cluster.
--
-- The Amazon Web Services KMS key identifier is the key ARN, key ID, alias
-- ARN, or alias name for the Amazon Web Services KMS customer master key
-- (CMK). To use a CMK in a different Amazon Web Services account, specify
-- the key ARN or alias ARN.
--
-- When a CMK isn\'t specified in @KmsKeyId@:
--
-- -   If @ReplicationSourceIdentifier@ identifies an encrypted source,
--     then Amazon RDS will use the CMK used to encrypt the source.
--     Otherwise, Amazon RDS will use your default CMK.
--
-- -   If the @StorageEncrypted@ parameter is enabled and
--     @ReplicationSourceIdentifier@ isn\'t specified, then Amazon RDS will
--     use your default CMK.
--
-- There is a default CMK for your Amazon Web Services account. Your Amazon
-- Web Services account has a different default CMK for each Amazon Web
-- Services Region.
--
-- If you create a read replica of an encrypted DB cluster in another
-- Amazon Web Services Region, you must set @KmsKeyId@ to a Amazon Web
-- Services KMS key identifier that is valid in the destination Amazon Web
-- Services Region. This CMK is used to encrypt the read replica in that
-- Amazon Web Services Region.
createDBCluster_kmsKeyId :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Text)
createDBCluster_kmsKeyId :: (Maybe Text -> f (Maybe Text))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_kmsKeyId = (CreateDBCluster -> Maybe Text)
-> (CreateDBCluster -> Maybe Text -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:CreateDBCluster' :: CreateDBCluster -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Text
a -> CreateDBCluster
s {$sel:kmsKeyId:CreateDBCluster' :: Maybe Text
kmsKeyId = Maybe Text
a} :: CreateDBCluster)

-- | The daily time range during which automated backups are created if
-- automated backups are enabled using the @BackupRetentionPeriod@
-- parameter.
--
-- The default is a 30-minute window selected at random from an 8-hour
-- block of time for each Amazon Web Services Region. To view the time
-- blocks available, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.html#Aurora.Managing.Backups.BackupWindow Backup window>
-- in the /Amazon Aurora User Guide./
--
-- Constraints:
--
-- -   Must be in the format @hh24:mi-hh24:mi@.
--
-- -   Must be in Universal Coordinated Time (UTC).
--
-- -   Must not conflict with the preferred maintenance window.
--
-- -   Must be at least 30 minutes.
createDBCluster_preferredBackupWindow :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Text)
createDBCluster_preferredBackupWindow :: (Maybe Text -> f (Maybe Text))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_preferredBackupWindow = (CreateDBCluster -> Maybe Text)
-> (CreateDBCluster -> Maybe Text -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Text
preferredBackupWindow :: Maybe Text
$sel:preferredBackupWindow:CreateDBCluster' :: CreateDBCluster -> Maybe Text
preferredBackupWindow} -> Maybe Text
preferredBackupWindow) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Text
a -> CreateDBCluster
s {$sel:preferredBackupWindow:CreateDBCluster' :: Maybe Text
preferredBackupWindow = Maybe Text
a} :: CreateDBCluster)

-- | The number of days for which automated backups are retained.
--
-- Default: 1
--
-- Constraints:
--
-- -   Must be a value from 1 to 35
createDBCluster_backupRetentionPeriod :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Int)
createDBCluster_backupRetentionPeriod :: (Maybe Int -> f (Maybe Int))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_backupRetentionPeriod = (CreateDBCluster -> Maybe Int)
-> (CreateDBCluster -> Maybe Int -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Int
backupRetentionPeriod :: Maybe Int
$sel:backupRetentionPeriod:CreateDBCluster' :: CreateDBCluster -> Maybe Int
backupRetentionPeriod} -> Maybe Int
backupRetentionPeriod) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Int
a -> CreateDBCluster
s {$sel:backupRetentionPeriod:CreateDBCluster' :: Maybe Int
backupRetentionPeriod = Maybe Int
a} :: CreateDBCluster)

-- | A list of EC2 VPC security groups to associate with this DB cluster.
createDBCluster_vpcSecurityGroupIds :: Lens.Lens' CreateDBCluster (Prelude.Maybe [Prelude.Text])
createDBCluster_vpcSecurityGroupIds :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_vpcSecurityGroupIds = (CreateDBCluster -> Maybe [Text])
-> (CreateDBCluster -> Maybe [Text] -> CreateDBCluster)
-> Lens
     CreateDBCluster CreateDBCluster (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe [Text]
vpcSecurityGroupIds :: Maybe [Text]
$sel:vpcSecurityGroupIds:CreateDBCluster' :: CreateDBCluster -> Maybe [Text]
vpcSecurityGroupIds} -> Maybe [Text]
vpcSecurityGroupIds) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe [Text]
a -> CreateDBCluster
s {$sel:vpcSecurityGroupIds:CreateDBCluster' :: Maybe [Text]
vpcSecurityGroupIds = Maybe [Text]
a} :: CreateDBCluster) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateDBCluster -> f CreateDBCluster)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateDBCluster
-> f CreateDBCluster
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 name for your database of up to 64 alphanumeric characters. If you
-- do not provide a name, Amazon RDS doesn\'t create a database in the DB
-- cluster you are creating.
createDBCluster_databaseName :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Text)
createDBCluster_databaseName :: (Maybe Text -> f (Maybe Text))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_databaseName = (CreateDBCluster -> Maybe Text)
-> (CreateDBCluster -> Maybe Text -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Text
databaseName :: Maybe Text
$sel:databaseName:CreateDBCluster' :: CreateDBCluster -> Maybe Text
databaseName} -> Maybe Text
databaseName) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Text
a -> CreateDBCluster
s {$sel:databaseName:CreateDBCluster' :: Maybe Text
databaseName = Maybe Text
a} :: CreateDBCluster)

-- | The name of the DB cluster parameter group to associate with this DB
-- cluster. If you do not specify a value, then the default DB cluster
-- parameter group for the specified DB engine and version is used.
--
-- Constraints:
--
-- -   If supplied, must match the name of an existing DB cluster parameter
--     group.
createDBCluster_dbClusterParameterGroupName :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Text)
createDBCluster_dbClusterParameterGroupName :: (Maybe Text -> f (Maybe Text))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_dbClusterParameterGroupName = (CreateDBCluster -> Maybe Text)
-> (CreateDBCluster -> Maybe Text -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Text
dbClusterParameterGroupName :: Maybe Text
$sel:dbClusterParameterGroupName:CreateDBCluster' :: CreateDBCluster -> Maybe Text
dbClusterParameterGroupName} -> Maybe Text
dbClusterParameterGroupName) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Text
a -> CreateDBCluster
s {$sel:dbClusterParameterGroupName:CreateDBCluster' :: Maybe Text
dbClusterParameterGroupName = Maybe Text
a} :: CreateDBCluster)

-- | The DB engine mode of the DB cluster, either @provisioned@,
-- @serverless@, @parallelquery@, @global@, or @multimaster@.
--
-- The @parallelquery@ engine mode isn\'t required for Aurora MySQL version
-- 1.23 and higher 1.x versions, and version 2.09 and higher 2.x versions.
--
-- The @global@ engine mode isn\'t required for Aurora MySQL version 1.22
-- and higher 1.x versions, and @global@ engine mode isn\'t required for
-- any 2.x versions.
--
-- The @multimaster@ engine mode only applies for DB clusters created with
-- Aurora MySQL version 5.6.10a.
--
-- For Aurora PostgreSQL, the @global@ engine mode isn\'t required, and
-- both the @parallelquery@ and the @multimaster@ engine modes currently
-- aren\'t supported.
--
-- Limitations and requirements apply to some DB engine modes. For more
-- information, see the following sections in the /Amazon Aurora User
-- Guide/:
--
-- -   <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html#aurora-serverless.limitations Limitations of Aurora Serverless>
--
-- -   <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-mysql-parallel-query.html#aurora-mysql-parallel-query-limitations Limitations of Parallel Query>
--
-- -   <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database.html#aurora-global-database.limitations Limitations of Aurora Global Databases>
--
-- -   <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-multi-master.html#aurora-multi-master-limitations Limitations of Multi-Master Clusters>
createDBCluster_engineMode :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Text)
createDBCluster_engineMode :: (Maybe Text -> f (Maybe Text))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_engineMode = (CreateDBCluster -> Maybe Text)
-> (CreateDBCluster -> Maybe Text -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Text
engineMode :: Maybe Text
$sel:engineMode:CreateDBCluster' :: CreateDBCluster -> Maybe Text
engineMode} -> Maybe Text
engineMode) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Text
a -> CreateDBCluster
s {$sel:engineMode:CreateDBCluster' :: Maybe Text
engineMode = Maybe Text
a} :: CreateDBCluster)

-- | For DB clusters in @serverless@ DB engine mode, the scaling properties
-- of the DB cluster.
createDBCluster_scalingConfiguration :: Lens.Lens' CreateDBCluster (Prelude.Maybe ScalingConfiguration)
createDBCluster_scalingConfiguration :: (Maybe ScalingConfiguration -> f (Maybe ScalingConfiguration))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_scalingConfiguration = (CreateDBCluster -> Maybe ScalingConfiguration)
-> (CreateDBCluster
    -> Maybe ScalingConfiguration -> CreateDBCluster)
-> Lens
     CreateDBCluster
     CreateDBCluster
     (Maybe ScalingConfiguration)
     (Maybe ScalingConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe ScalingConfiguration
scalingConfiguration :: Maybe ScalingConfiguration
$sel:scalingConfiguration:CreateDBCluster' :: CreateDBCluster -> Maybe ScalingConfiguration
scalingConfiguration} -> Maybe ScalingConfiguration
scalingConfiguration) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe ScalingConfiguration
a -> CreateDBCluster
s {$sel:scalingConfiguration:CreateDBCluster' :: Maybe ScalingConfiguration
scalingConfiguration = Maybe ScalingConfiguration
a} :: CreateDBCluster)

-- | A value that indicates that the DB cluster should be associated with the
-- specified option group.
--
-- Permanent options can\'t be removed from an option group. The option
-- group can\'t be removed from a DB cluster once it is associated with a
-- DB cluster.
createDBCluster_optionGroupName :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Text)
createDBCluster_optionGroupName :: (Maybe Text -> f (Maybe Text))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_optionGroupName = (CreateDBCluster -> Maybe Text)
-> (CreateDBCluster -> Maybe Text -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Text
optionGroupName :: Maybe Text
$sel:optionGroupName:CreateDBCluster' :: CreateDBCluster -> Maybe Text
optionGroupName} -> Maybe Text
optionGroupName) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Text
a -> CreateDBCluster
s {$sel:optionGroupName:CreateDBCluster' :: Maybe Text
optionGroupName = Maybe Text
a} :: CreateDBCluster)

-- | A value that indicates whether to copy all tags from the DB cluster to
-- snapshots of the DB cluster. The default is not to copy them.
createDBCluster_copyTagsToSnapshot :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Bool)
createDBCluster_copyTagsToSnapshot :: (Maybe Bool -> f (Maybe Bool))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_copyTagsToSnapshot = (CreateDBCluster -> Maybe Bool)
-> (CreateDBCluster -> Maybe Bool -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Bool
copyTagsToSnapshot :: Maybe Bool
$sel:copyTagsToSnapshot:CreateDBCluster' :: CreateDBCluster -> Maybe Bool
copyTagsToSnapshot} -> Maybe Bool
copyTagsToSnapshot) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Bool
a -> CreateDBCluster
s {$sel:copyTagsToSnapshot:CreateDBCluster' :: Maybe Bool
copyTagsToSnapshot = Maybe Bool
a} :: CreateDBCluster)

-- | Specify the name of the IAM role to be used when making API calls to the
-- Directory Service.
createDBCluster_domainIAMRoleName :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Text)
createDBCluster_domainIAMRoleName :: (Maybe Text -> f (Maybe Text))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_domainIAMRoleName = (CreateDBCluster -> Maybe Text)
-> (CreateDBCluster -> Maybe Text -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Text
domainIAMRoleName :: Maybe Text
$sel:domainIAMRoleName:CreateDBCluster' :: CreateDBCluster -> Maybe Text
domainIAMRoleName} -> Maybe Text
domainIAMRoleName) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Text
a -> CreateDBCluster
s {$sel:domainIAMRoleName:CreateDBCluster' :: Maybe Text
domainIAMRoleName = Maybe Text
a} :: CreateDBCluster)

-- | Tags to assign to the DB cluster.
createDBCluster_tags :: Lens.Lens' CreateDBCluster (Prelude.Maybe [Tag])
createDBCluster_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_tags = (CreateDBCluster -> Maybe [Tag])
-> (CreateDBCluster -> Maybe [Tag] -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateDBCluster' :: CreateDBCluster -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe [Tag]
a -> CreateDBCluster
s {$sel:tags:CreateDBCluster' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateDBCluster) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateDBCluster -> f CreateDBCluster)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDBCluster
-> f CreateDBCluster
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 instances in the DB cluster accept
-- connections.
--
-- Default: @3306@ if engine is set as aurora or @5432@ if set to
-- aurora-postgresql.
createDBCluster_port :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Int)
createDBCluster_port :: (Maybe Int -> f (Maybe Int))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_port = (CreateDBCluster -> Maybe Int)
-> (CreateDBCluster -> Maybe Int -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Int
port :: Maybe Int
$sel:port:CreateDBCluster' :: CreateDBCluster -> Maybe Int
port} -> Maybe Int
port) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Int
a -> CreateDBCluster
s {$sel:port:CreateDBCluster' :: Maybe Int
port = Maybe Int
a} :: CreateDBCluster)

-- | A value that indicates whether to enable mapping of Amazon Web Services
-- Identity and Access Management (IAM) accounts to database accounts. By
-- default, mapping is disabled.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.html IAM Database Authentication>
-- in the /Amazon Aurora User Guide./
createDBCluster_enableIAMDatabaseAuthentication :: Lens.Lens' CreateDBCluster (Prelude.Maybe Prelude.Bool)
createDBCluster_enableIAMDatabaseAuthentication :: (Maybe Bool -> f (Maybe Bool))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_enableIAMDatabaseAuthentication = (CreateDBCluster -> Maybe Bool)
-> (CreateDBCluster -> Maybe Bool -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe Bool
enableIAMDatabaseAuthentication :: Maybe Bool
$sel:enableIAMDatabaseAuthentication:CreateDBCluster' :: CreateDBCluster -> Maybe Bool
enableIAMDatabaseAuthentication} -> Maybe Bool
enableIAMDatabaseAuthentication) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe Bool
a -> CreateDBCluster
s {$sel:enableIAMDatabaseAuthentication:CreateDBCluster' :: Maybe Bool
enableIAMDatabaseAuthentication = Maybe Bool
a} :: CreateDBCluster)

-- | The list of log types that need to be enabled for exporting to
-- CloudWatch Logs. The values in the list depend on the DB engine being
-- used. For more information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch Publishing Database Logs to Amazon CloudWatch Logs>
-- in the /Amazon Aurora User Guide/.
--
-- __Aurora MySQL__
--
-- Possible values are @audit@, @error@, @general@, and @slowquery@.
--
-- __Aurora PostgreSQL__
--
-- Possible value is @postgresql@.
createDBCluster_enableCloudwatchLogsExports :: Lens.Lens' CreateDBCluster (Prelude.Maybe [Prelude.Text])
createDBCluster_enableCloudwatchLogsExports :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateDBCluster -> f CreateDBCluster
createDBCluster_enableCloudwatchLogsExports = (CreateDBCluster -> Maybe [Text])
-> (CreateDBCluster -> Maybe [Text] -> CreateDBCluster)
-> Lens
     CreateDBCluster CreateDBCluster (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Maybe [Text]
enableCloudwatchLogsExports :: Maybe [Text]
$sel:enableCloudwatchLogsExports:CreateDBCluster' :: CreateDBCluster -> Maybe [Text]
enableCloudwatchLogsExports} -> Maybe [Text]
enableCloudwatchLogsExports) (\s :: CreateDBCluster
s@CreateDBCluster' {} Maybe [Text]
a -> CreateDBCluster
s {$sel:enableCloudwatchLogsExports:CreateDBCluster' :: Maybe [Text]
enableCloudwatchLogsExports = Maybe [Text]
a} :: CreateDBCluster) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateDBCluster -> f CreateDBCluster)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateDBCluster
-> f CreateDBCluster
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 DB cluster identifier. This parameter is stored as a lowercase
-- string.
--
-- Constraints:
--
-- -   Must contain from 1 to 63 letters, numbers, or hyphens.
--
-- -   First character must be a letter.
--
-- -   Can\'t end with a hyphen or contain two consecutive hyphens.
--
-- Example: @my-cluster1@
createDBCluster_dbClusterIdentifier :: Lens.Lens' CreateDBCluster Prelude.Text
createDBCluster_dbClusterIdentifier :: (Text -> f Text) -> CreateDBCluster -> f CreateDBCluster
createDBCluster_dbClusterIdentifier = (CreateDBCluster -> Text)
-> (CreateDBCluster -> Text -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Text
dbClusterIdentifier :: Text
$sel:dbClusterIdentifier:CreateDBCluster' :: CreateDBCluster -> Text
dbClusterIdentifier} -> Text
dbClusterIdentifier) (\s :: CreateDBCluster
s@CreateDBCluster' {} Text
a -> CreateDBCluster
s {$sel:dbClusterIdentifier:CreateDBCluster' :: Text
dbClusterIdentifier = Text
a} :: CreateDBCluster)

-- | The name of the database engine to be used for this DB cluster.
--
-- Valid Values: @aurora@ (for MySQL 5.6-compatible Aurora), @aurora-mysql@
-- (for MySQL 5.7-compatible Aurora), and @aurora-postgresql@
createDBCluster_engine :: Lens.Lens' CreateDBCluster Prelude.Text
createDBCluster_engine :: (Text -> f Text) -> CreateDBCluster -> f CreateDBCluster
createDBCluster_engine = (CreateDBCluster -> Text)
-> (CreateDBCluster -> Text -> CreateDBCluster)
-> Lens CreateDBCluster CreateDBCluster Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBCluster' {Text
engine :: Text
$sel:engine:CreateDBCluster' :: CreateDBCluster -> Text
engine} -> Text
engine) (\s :: CreateDBCluster
s@CreateDBCluster' {} Text
a -> CreateDBCluster
s {$sel:engine:CreateDBCluster' :: Text
engine = Text
a} :: CreateDBCluster)

instance Core.AWSRequest CreateDBCluster where
  type
    AWSResponse CreateDBCluster =
      CreateDBClusterResponse
  request :: CreateDBCluster -> Request CreateDBCluster
request = Service -> CreateDBCluster -> Request CreateDBCluster
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateDBCluster
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateDBCluster)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse CreateDBCluster))
-> Logger
-> Service
-> Proxy CreateDBCluster
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateDBCluster)))
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
"CreateDBClusterResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe DBCluster -> Int -> CreateDBClusterResponse
CreateDBClusterResponse'
            (Maybe DBCluster -> Int -> CreateDBClusterResponse)
-> Either String (Maybe DBCluster)
-> Either String (Int -> CreateDBClusterResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe DBCluster)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DBCluster")
            Either String (Int -> CreateDBClusterResponse)
-> Either String Int -> Either String CreateDBClusterResponse
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 CreateDBCluster

instance Prelude.NFData CreateDBCluster

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

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

instance Core.ToQuery CreateDBCluster where
  toQuery :: CreateDBCluster -> QueryString
toQuery CreateDBCluster' {Maybe Bool
Maybe Int
Maybe Integer
Maybe [Text]
Maybe [Tag]
Maybe Text
Maybe ScalingConfiguration
Text
engine :: Text
dbClusterIdentifier :: Text
enableCloudwatchLogsExports :: Maybe [Text]
enableIAMDatabaseAuthentication :: Maybe Bool
port :: Maybe Int
tags :: Maybe [Tag]
domainIAMRoleName :: Maybe Text
copyTagsToSnapshot :: Maybe Bool
optionGroupName :: Maybe Text
scalingConfiguration :: Maybe ScalingConfiguration
engineMode :: Maybe Text
dbClusterParameterGroupName :: Maybe Text
databaseName :: Maybe Text
vpcSecurityGroupIds :: Maybe [Text]
backupRetentionPeriod :: Maybe Int
preferredBackupWindow :: Maybe Text
kmsKeyId :: Maybe Text
characterSetName :: Maybe Text
destinationRegion :: Maybe Text
availabilityZones :: Maybe [Text]
preferredMaintenanceWindow :: Maybe Text
preSignedUrl :: Maybe Text
backtrackWindow :: Maybe Integer
domain :: Maybe Text
dbSubnetGroupName :: Maybe Text
masterUsername :: Maybe Text
globalClusterIdentifier :: Maybe Text
enableHttpEndpoint :: Maybe Bool
replicationSourceIdentifier :: Maybe Text
masterUserPassword :: Maybe Text
storageEncrypted :: Maybe Bool
deletionProtection :: Maybe Bool
enableGlobalWriteForwarding :: Maybe Bool
engineVersion :: Maybe Text
$sel:engine:CreateDBCluster' :: CreateDBCluster -> Text
$sel:dbClusterIdentifier:CreateDBCluster' :: CreateDBCluster -> Text
$sel:enableCloudwatchLogsExports:CreateDBCluster' :: CreateDBCluster -> Maybe [Text]
$sel:enableIAMDatabaseAuthentication:CreateDBCluster' :: CreateDBCluster -> Maybe Bool
$sel:port:CreateDBCluster' :: CreateDBCluster -> Maybe Int
$sel:tags:CreateDBCluster' :: CreateDBCluster -> Maybe [Tag]
$sel:domainIAMRoleName:CreateDBCluster' :: CreateDBCluster -> Maybe Text
$sel:copyTagsToSnapshot:CreateDBCluster' :: CreateDBCluster -> Maybe Bool
$sel:optionGroupName:CreateDBCluster' :: CreateDBCluster -> Maybe Text
$sel:scalingConfiguration:CreateDBCluster' :: CreateDBCluster -> Maybe ScalingConfiguration
$sel:engineMode:CreateDBCluster' :: CreateDBCluster -> Maybe Text
$sel:dbClusterParameterGroupName:CreateDBCluster' :: CreateDBCluster -> Maybe Text
$sel:databaseName:CreateDBCluster' :: CreateDBCluster -> Maybe Text
$sel:vpcSecurityGroupIds:CreateDBCluster' :: CreateDBCluster -> Maybe [Text]
$sel:backupRetentionPeriod:CreateDBCluster' :: CreateDBCluster -> Maybe Int
$sel:preferredBackupWindow:CreateDBCluster' :: CreateDBCluster -> Maybe Text
$sel:kmsKeyId:CreateDBCluster' :: CreateDBCluster -> Maybe Text
$sel:characterSetName:CreateDBCluster' :: CreateDBCluster -> Maybe Text
$sel:destinationRegion:CreateDBCluster' :: CreateDBCluster -> Maybe Text
$sel:availabilityZones:CreateDBCluster' :: CreateDBCluster -> Maybe [Text]
$sel:preferredMaintenanceWindow:CreateDBCluster' :: CreateDBCluster -> Maybe Text
$sel:preSignedUrl:CreateDBCluster' :: CreateDBCluster -> Maybe Text
$sel:backtrackWindow:CreateDBCluster' :: CreateDBCluster -> Maybe Integer
$sel:domain:CreateDBCluster' :: CreateDBCluster -> Maybe Text
$sel:dbSubnetGroupName:CreateDBCluster' :: CreateDBCluster -> Maybe Text
$sel:masterUsername:CreateDBCluster' :: CreateDBCluster -> Maybe Text
$sel:globalClusterIdentifier:CreateDBCluster' :: CreateDBCluster -> Maybe Text
$sel:enableHttpEndpoint:CreateDBCluster' :: CreateDBCluster -> Maybe Bool
$sel:replicationSourceIdentifier:CreateDBCluster' :: CreateDBCluster -> Maybe Text
$sel:masterUserPassword:CreateDBCluster' :: CreateDBCluster -> Maybe Text
$sel:storageEncrypted:CreateDBCluster' :: CreateDBCluster -> Maybe Bool
$sel:deletionProtection:CreateDBCluster' :: CreateDBCluster -> Maybe Bool
$sel:enableGlobalWriteForwarding:CreateDBCluster' :: CreateDBCluster -> Maybe Bool
$sel:engineVersion:CreateDBCluster' :: CreateDBCluster -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"CreateDBCluster" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"EngineVersion" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
engineVersion,
        ByteString
"EnableGlobalWriteForwarding"
          ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
enableGlobalWriteForwarding,
        ByteString
"DeletionProtection" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
deletionProtection,
        ByteString
"StorageEncrypted" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
storageEncrypted,
        ByteString
"MasterUserPassword" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
masterUserPassword,
        ByteString
"ReplicationSourceIdentifier"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
replicationSourceIdentifier,
        ByteString
"EnableHttpEndpoint" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
enableHttpEndpoint,
        ByteString
"GlobalClusterIdentifier"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
globalClusterIdentifier,
        ByteString
"MasterUsername" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
masterUsername,
        ByteString
"DBSubnetGroupName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
dbSubnetGroupName,
        ByteString
"Domain" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
domain,
        ByteString
"BacktrackWindow" ByteString -> Maybe Integer -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Integer
backtrackWindow,
        ByteString
"PreSignedUrl" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
preSignedUrl,
        ByteString
"PreferredMaintenanceWindow"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
preferredMaintenanceWindow,
        ByteString
"AvailabilityZones"
          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
"AvailabilityZone"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
availabilityZones
            ),
        ByteString
"DestinationRegion" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
destinationRegion,
        ByteString
"CharacterSetName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
characterSetName,
        ByteString
"KmsKeyId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
kmsKeyId,
        ByteString
"PreferredBackupWindow"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
preferredBackupWindow,
        ByteString
"BackupRetentionPeriod"
          ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
backupRetentionPeriod,
        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
"DatabaseName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
databaseName,
        ByteString
"DBClusterParameterGroupName"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
dbClusterParameterGroupName,
        ByteString
"EngineMode" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
engineMode,
        ByteString
"ScalingConfiguration" ByteString -> Maybe ScalingConfiguration -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ScalingConfiguration
scalingConfiguration,
        ByteString
"OptionGroupName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
optionGroupName,
        ByteString
"CopyTagsToSnapshot" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
copyTagsToSnapshot,
        ByteString
"DomainIAMRoleName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
domainIAMRoleName,
        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
"EnableIAMDatabaseAuthentication"
          ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
enableIAMDatabaseAuthentication,
        ByteString
"EnableCloudwatchLogsExports"
          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
"member"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
enableCloudwatchLogsExports
            ),
        ByteString
"DBClusterIdentifier" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbClusterIdentifier,
        ByteString
"Engine" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
engine
      ]

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

-- |
-- Create a value of 'CreateDBClusterResponse' 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:
--
-- 'dbCluster', 'createDBClusterResponse_dbCluster' - Undocumented member.
--
-- 'httpStatus', 'createDBClusterResponse_httpStatus' - The response's http status code.
newCreateDBClusterResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateDBClusterResponse
newCreateDBClusterResponse :: Int -> CreateDBClusterResponse
newCreateDBClusterResponse Int
pHttpStatus_ =
  CreateDBClusterResponse' :: Maybe DBCluster -> Int -> CreateDBClusterResponse
CreateDBClusterResponse'
    { $sel:dbCluster:CreateDBClusterResponse' :: Maybe DBCluster
dbCluster =
        Maybe DBCluster
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateDBClusterResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
createDBClusterResponse_dbCluster :: Lens.Lens' CreateDBClusterResponse (Prelude.Maybe DBCluster)
createDBClusterResponse_dbCluster :: (Maybe DBCluster -> f (Maybe DBCluster))
-> CreateDBClusterResponse -> f CreateDBClusterResponse
createDBClusterResponse_dbCluster = (CreateDBClusterResponse -> Maybe DBCluster)
-> (CreateDBClusterResponse
    -> Maybe DBCluster -> CreateDBClusterResponse)
-> Lens
     CreateDBClusterResponse
     CreateDBClusterResponse
     (Maybe DBCluster)
     (Maybe DBCluster)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBClusterResponse' {Maybe DBCluster
dbCluster :: Maybe DBCluster
$sel:dbCluster:CreateDBClusterResponse' :: CreateDBClusterResponse -> Maybe DBCluster
dbCluster} -> Maybe DBCluster
dbCluster) (\s :: CreateDBClusterResponse
s@CreateDBClusterResponse' {} Maybe DBCluster
a -> CreateDBClusterResponse
s {$sel:dbCluster:CreateDBClusterResponse' :: Maybe DBCluster
dbCluster = Maybe DBCluster
a} :: CreateDBClusterResponse)

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

instance Prelude.NFData CreateDBClusterResponse