{-# 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.CreateDBInstance
-- 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 DB instance.
module Amazonka.RDS.CreateDBInstance
  ( -- * Creating a Request
    CreateDBInstance (..),
    newCreateDBInstance,

    -- * Request Lenses
    createDBInstance_engineVersion,
    createDBInstance_dbSecurityGroups,
    createDBInstance_deletionProtection,
    createDBInstance_storageEncrypted,
    createDBInstance_dbClusterIdentifier,
    createDBInstance_masterUserPassword,
    createDBInstance_publiclyAccessible,
    createDBInstance_autoMinorVersionUpgrade,
    createDBInstance_masterUsername,
    createDBInstance_dbSubnetGroupName,
    createDBInstance_monitoringRoleArn,
    createDBInstance_iops,
    createDBInstance_domain,
    createDBInstance_enableCustomerOwnedIp,
    createDBInstance_monitoringInterval,
    createDBInstance_tdeCredentialPassword,
    createDBInstance_processorFeatures,
    createDBInstance_promotionTier,
    createDBInstance_licenseModel,
    createDBInstance_preferredMaintenanceWindow,
    createDBInstance_performanceInsightsRetentionPeriod,
    createDBInstance_characterSetName,
    createDBInstance_maxAllocatedStorage,
    createDBInstance_enablePerformanceInsights,
    createDBInstance_kmsKeyId,
    createDBInstance_dbParameterGroupName,
    createDBInstance_preferredBackupWindow,
    createDBInstance_availabilityZone,
    createDBInstance_backupRetentionPeriod,
    createDBInstance_ncharCharacterSetName,
    createDBInstance_performanceInsightsKMSKeyId,
    createDBInstance_vpcSecurityGroupIds,
    createDBInstance_multiAZ,
    createDBInstance_allocatedStorage,
    createDBInstance_optionGroupName,
    createDBInstance_copyTagsToSnapshot,
    createDBInstance_timezone,
    createDBInstance_tdeCredentialArn,
    createDBInstance_domainIAMRoleName,
    createDBInstance_tags,
    createDBInstance_port,
    createDBInstance_enableIAMDatabaseAuthentication,
    createDBInstance_storageType,
    createDBInstance_enableCloudwatchLogsExports,
    createDBInstance_dbName,
    createDBInstance_dbInstanceIdentifier,
    createDBInstance_dbInstanceClass,
    createDBInstance_engine,

    -- * Destructuring the Response
    CreateDBInstanceResponse (..),
    newCreateDBInstanceResponse,

    -- * Response Lenses
    createDBInstanceResponse_dbInstance,
    createDBInstanceResponse_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:/ 'newCreateDBInstance' smart constructor.
data CreateDBInstance = CreateDBInstance'
  { -- | The version number of the database engine to use.
    --
    -- For a list of valid engine versions, use the @DescribeDBEngineVersions@
    -- action.
    --
    -- The following are the database engines and links to information about
    -- the major and minor versions that are available with Amazon RDS. Not
    -- every database engine is available for every Amazon Web Services Region.
    --
    -- __Amazon Aurora__
    --
    -- Not applicable. The version number of the database engine to be used by
    -- the DB instance is managed by the DB cluster.
    --
    -- __MariaDB__
    --
    -- See
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MariaDB.html#MariaDB.Concepts.VersionMgmt MariaDB on Amazon RDS Versions>
    -- in the /Amazon RDS User Guide./
    --
    -- __Microsoft SQL Server__
    --
    -- See
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html#SQLServer.Concepts.General.VersionSupport Microsoft SQL Server Versions on Amazon RDS>
    -- in the /Amazon RDS User Guide./
    --
    -- __MySQL__
    --
    -- See
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MySQL.html#MySQL.Concepts.VersionMgmt MySQL on Amazon RDS Versions>
    -- in the /Amazon RDS User Guide./
    --
    -- __Oracle__
    --
    -- See
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.Oracle.PatchComposition.html Oracle Database Engine Release Notes>
    -- in the /Amazon RDS User Guide./
    --
    -- __PostgreSQL__
    --
    -- See
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts Amazon RDS for PostgreSQL versions and extensions>
    -- in the /Amazon RDS User Guide./
    CreateDBInstance -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
    -- | A list of DB security groups to associate with this DB instance.
    --
    -- Default: The default DB security group for the database engine.
    CreateDBInstance -> Maybe [Text]
dbSecurityGroups :: Prelude.Maybe [Prelude.Text],
    -- | A value that indicates whether the DB instance has deletion protection
    -- enabled. The database can\'t be deleted when deletion protection is
    -- enabled. By default, deletion protection is disabled. For more
    -- information, see
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html Deleting a DB Instance>.
    --
    -- __Amazon Aurora__
    --
    -- Not applicable. You can enable or disable deletion protection for the DB
    -- cluster. For more information, see @CreateDBCluster@. DB instances in a
    -- DB cluster can be deleted even when deletion protection is enabled for
    -- the DB cluster.
    CreateDBInstance -> Maybe Bool
deletionProtection :: Prelude.Maybe Prelude.Bool,
    -- | A value that indicates whether the DB instance is encrypted. By default,
    -- it isn\'t encrypted.
    --
    -- __Amazon Aurora__
    --
    -- Not applicable. The encryption for DB instances is managed by the DB
    -- cluster.
    CreateDBInstance -> Maybe Bool
storageEncrypted :: Prelude.Maybe Prelude.Bool,
    -- | The identifier of the DB cluster that the instance will belong to.
    CreateDBInstance -> Maybe Text
dbClusterIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The password for the master user. The password can include any printable
    -- ASCII character except \"\/\", \"\"\", or \"\@\".
    --
    -- __Amazon Aurora__
    --
    -- Not applicable. The password for the master user is managed by the DB
    -- cluster.
    --
    -- __MariaDB__
    --
    -- Constraints: Must contain from 8 to 41 characters.
    --
    -- __Microsoft SQL Server__
    --
    -- Constraints: Must contain from 8 to 128 characters.
    --
    -- __MySQL__
    --
    -- Constraints: Must contain from 8 to 41 characters.
    --
    -- __Oracle__
    --
    -- Constraints: Must contain from 8 to 30 characters.
    --
    -- __PostgreSQL__
    --
    -- Constraints: Must contain from 8 to 128 characters.
    CreateDBInstance -> Maybe Text
masterUserPassword :: Prelude.Maybe Prelude.Text,
    -- | A value that indicates whether the DB instance is publicly accessible.
    --
    -- When the DB instance is publicly accessible, its DNS endpoint resolves
    -- to the private IP address from within the DB instance\'s VPC, and to the
    -- public IP address from outside of the DB instance\'s VPC. Access to the
    -- DB instance is ultimately controlled by the security group it uses, and
    -- that public access is not permitted if the security group assigned to
    -- the DB instance doesn\'t permit it.
    --
    -- When the DB instance isn\'t publicly accessible, it is an internal DB
    -- instance with a DNS name that resolves to a private IP address.
    --
    -- Default: The default behavior varies depending on whether
    -- @DBSubnetGroupName@ is specified.
    --
    -- If @DBSubnetGroupName@ isn\'t specified, and @PubliclyAccessible@ isn\'t
    -- specified, the following applies:
    --
    -- -   If the default VPC in the target region doesn’t have an Internet
    --     gateway attached to it, the DB instance is private.
    --
    -- -   If the default VPC in the target region has an Internet gateway
    --     attached to it, the DB instance is public.
    --
    -- If @DBSubnetGroupName@ is specified, and @PubliclyAccessible@ isn\'t
    -- specified, the following applies:
    --
    -- -   If the subnets are part of a VPC that doesn’t have an Internet
    --     gateway attached to it, the DB instance is private.
    --
    -- -   If the subnets are part of a VPC that has an Internet gateway
    --     attached to it, the DB instance is public.
    CreateDBInstance -> Maybe Bool
publiclyAccessible :: Prelude.Maybe Prelude.Bool,
    -- | A value that indicates whether minor engine upgrades are applied
    -- automatically to the DB instance during the maintenance window. By
    -- default, minor engine upgrades are applied automatically.
    CreateDBInstance -> Maybe Bool
autoMinorVersionUpgrade :: Prelude.Maybe Prelude.Bool,
    -- | The name for the master user.
    --
    -- __Amazon Aurora__
    --
    -- Not applicable. The name for the master user is managed by the DB
    -- cluster.
    --
    -- __MariaDB__
    --
    -- Constraints:
    --
    -- -   Required for MariaDB.
    --
    -- -   Must be 1 to 16 letters or numbers.
    --
    -- -   Can\'t be a reserved word for the chosen database engine.
    --
    -- __Microsoft SQL Server__
    --
    -- Constraints:
    --
    -- -   Required for SQL Server.
    --
    -- -   Must be 1 to 128 letters or numbers.
    --
    -- -   The first character must be a letter.
    --
    -- -   Can\'t be a reserved word for the chosen database engine.
    --
    -- __MySQL__
    --
    -- Constraints:
    --
    -- -   Required for MySQL.
    --
    -- -   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.
    --
    -- __Oracle__
    --
    -- Constraints:
    --
    -- -   Required for Oracle.
    --
    -- -   Must be 1 to 30 letters or numbers.
    --
    -- -   First character must be a letter.
    --
    -- -   Can\'t be a reserved word for the chosen database engine.
    --
    -- __PostgreSQL__
    --
    -- Constraints:
    --
    -- -   Required for PostgreSQL.
    --
    -- -   Must be 1 to 63 letters or numbers.
    --
    -- -   First character must be a letter.
    --
    -- -   Can\'t be a reserved word for the chosen database engine.
    CreateDBInstance -> Maybe Text
masterUsername :: Prelude.Maybe Prelude.Text,
    -- | A DB subnet group to associate with this DB instance.
    --
    -- If there is no DB subnet group, then it is a non-VPC DB instance.
    CreateDBInstance -> Maybe Text
dbSubnetGroupName :: Prelude.Maybe Prelude.Text,
    -- | The ARN for the IAM role that permits RDS to send enhanced monitoring
    -- metrics to Amazon CloudWatch Logs. For example,
    -- @arn:aws:iam:123456789012:role\/emaccess@. For information on creating a
    -- monitoring role, go to
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.html#USER_Monitoring.OS.Enabling Setting Up and Enabling Enhanced Monitoring>
    -- in the /Amazon RDS User Guide/.
    --
    -- If @MonitoringInterval@ is set to a value other than 0, then you must
    -- supply a @MonitoringRoleArn@ value.
    CreateDBInstance -> Maybe Text
monitoringRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The amount of Provisioned IOPS (input\/output operations per second) to
    -- be initially allocated for the DB instance. For information about valid
    -- Iops values, see
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS Amazon RDS Provisioned IOPS Storage to Improve Performance>
    -- in the /Amazon RDS User Guide/.
    --
    -- Constraints: For MariaDB, MySQL, Oracle, and PostgreSQL DB instances,
    -- must be a multiple between .5 and 50 of the storage amount for the DB
    -- instance. For SQL Server DB instances, must be a multiple between 1 and
    -- 50 of the storage amount for the DB instance.
    CreateDBInstance -> Maybe Int
iops :: Prelude.Maybe Prelude.Int,
    -- | The Active Directory directory ID to create the DB instance in.
    -- Currently, only MySQL, Microsoft SQL Server, Oracle, and PostgreSQL DB
    -- instances can be created in an Active Directory Domain.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/kerberos-authentication.html Kerberos Authentication>
    -- in the /Amazon RDS User Guide/.
    CreateDBInstance -> Maybe Text
domain :: Prelude.Maybe Prelude.Text,
    -- | A value that indicates whether to enable a customer-owned IP address
    -- (CoIP) for an RDS on Outposts DB instance.
    --
    -- A /CoIP/ provides local or external connectivity to resources in your
    -- Outpost subnets through your on-premises network. For some use cases, a
    -- CoIP can provide lower latency for connections to the DB instance from
    -- outside of its virtual private cloud (VPC) on your local network.
    --
    -- For more information about RDS on Outposts, see
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html Working with Amazon RDS on Amazon Web Services Outposts>
    -- in the /Amazon RDS User Guide/.
    --
    -- For more information about CoIPs, see
    -- <https://docs.aws.amazon.com/outposts/latest/userguide/outposts-networking-components.html#ip-addressing Customer-owned IP addresses>
    -- in the /Amazon Web Services Outposts User Guide/.
    CreateDBInstance -> Maybe Bool
enableCustomerOwnedIp :: Prelude.Maybe Prelude.Bool,
    -- | The interval, in seconds, between points when Enhanced Monitoring
    -- metrics are collected for the DB instance. To disable collecting
    -- Enhanced Monitoring metrics, specify 0. The default is 0.
    --
    -- If @MonitoringRoleArn@ is specified, then you must also set
    -- @MonitoringInterval@ to a value other than 0.
    --
    -- Valid Values: @0, 1, 5, 10, 15, 30, 60@
    CreateDBInstance -> Maybe Int
monitoringInterval :: Prelude.Maybe Prelude.Int,
    -- | The password for the given ARN from the key store in order to access the
    -- device.
    CreateDBInstance -> Maybe Text
tdeCredentialPassword :: Prelude.Maybe Prelude.Text,
    -- | The number of CPU cores and the number of threads per core for the DB
    -- instance class of the DB instance.
    CreateDBInstance -> Maybe [ProcessorFeature]
processorFeatures :: Prelude.Maybe [ProcessorFeature],
    -- | A value that specifies the order in which an Aurora Replica is promoted
    -- to the primary instance after a failure of the existing primary
    -- instance. For more information, see
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.html#Aurora.Managing.FaultTolerance Fault Tolerance for an Aurora DB Cluster>
    -- in the /Amazon Aurora User Guide/.
    --
    -- Default: 1
    --
    -- Valid Values: 0 - 15
    CreateDBInstance -> Maybe Int
promotionTier :: Prelude.Maybe Prelude.Int,
    -- | License model information for this DB instance.
    --
    -- Valid values: @license-included@ | @bring-your-own-license@ |
    -- @general-public-license@
    CreateDBInstance -> Maybe Text
licenseModel :: Prelude.Maybe Prelude.Text,
    -- | The time range each week during which system maintenance can occur, in
    -- Universal Coordinated Time (UTC). For more information, see
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#Concepts.DBMaintenance Amazon RDS Maintenance Window>.
    --
    -- 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.
    --
    -- Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
    --
    -- Constraints: Minimum 30-minute window.
    CreateDBInstance -> Maybe Text
preferredMaintenanceWindow :: Prelude.Maybe Prelude.Text,
    -- | The amount of time, in days, to retain Performance Insights data. Valid
    -- values are 7 or 731 (2 years).
    CreateDBInstance -> Maybe Int
performanceInsightsRetentionPeriod :: Prelude.Maybe Prelude.Int,
    -- | For supported engines, indicates that the DB instance should be
    -- associated with the specified CharacterSet.
    --
    -- __Amazon Aurora__
    --
    -- Not applicable. The character set is managed by the DB cluster. For more
    -- information, see @CreateDBCluster@.
    CreateDBInstance -> Maybe Text
characterSetName :: Prelude.Maybe Prelude.Text,
    -- | The upper limit in gibibytes (GiB) to which Amazon RDS can automatically
    -- scale the storage of the DB instance.
    --
    -- For more information about this setting, including limitations that
    -- apply to it, see
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIOPS.StorageTypes.html#USER_PIOPS.Autoscaling Managing capacity automatically with Amazon RDS storage autoscaling>
    -- in the /Amazon RDS User Guide/.
    CreateDBInstance -> Maybe Int
maxAllocatedStorage :: Prelude.Maybe Prelude.Int,
    -- | A value that indicates whether to enable Performance Insights for the DB
    -- instance.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html Using Amazon Performance Insights>
    -- in the /Amazon Relational Database Service User Guide/.
    CreateDBInstance -> Maybe Bool
enablePerformanceInsights :: Prelude.Maybe Prelude.Bool,
    -- | The Amazon Web Services KMS key identifier for an encrypted DB instance.
    --
    -- 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.
    --
    -- __Amazon Aurora__
    --
    -- Not applicable. The Amazon Web Services KMS key identifier is managed by
    -- the DB cluster. For more information, see @CreateDBCluster@.
    --
    -- If @StorageEncrypted@ is enabled, and you do not specify a value for the
    -- @KmsKeyId@ parameter, then Amazon RDS uses 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.
    CreateDBInstance -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | The name of the DB parameter group to associate with this DB instance.
    -- If you do not specify a value, then the default DB parameter group for
    -- the specified DB engine and version is used.
    --
    -- Constraints:
    --
    -- -   Must be 1 to 255 letters, numbers, or hyphens.
    --
    -- -   First character must be a letter
    --
    -- -   Can\'t end with a hyphen or contain two consecutive hyphens
    CreateDBInstance -> Maybe Text
dbParameterGroupName :: 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. For more
    -- information, see
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow Backup window>
    -- in the /Amazon RDS User Guide/.
    --
    -- __Amazon Aurora__
    --
    -- Not applicable. The daily time range for creating automated backups is
    -- managed by the DB cluster.
    --
    -- 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.
    CreateDBInstance -> Maybe Text
preferredBackupWindow :: Prelude.Maybe Prelude.Text,
    -- | The Availability Zone (AZ) where the database will be created. For
    -- information on Amazon Web Services Regions and Availability Zones, see
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html Regions and Availability Zones>.
    --
    -- Default: A random, system-chosen Availability Zone in the endpoint\'s
    -- Amazon Web Services Region.
    --
    -- Example: @us-east-1d@
    --
    -- Constraint: The @AvailabilityZone@ parameter can\'t be specified if the
    -- DB instance is a Multi-AZ deployment. The specified Availability Zone
    -- must be in the same Amazon Web Services Region as the current endpoint.
    --
    -- If you\'re creating a DB instance in an RDS on VMware environment,
    -- specify the identifier of the custom Availability Zone to create the DB
    -- instance in.
    --
    -- For more information about RDS on VMware, see the
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/RDSonVMwareUserGuide/rds-on-vmware.html RDS on VMware User Guide.>
    CreateDBInstance -> Maybe Text
availabilityZone :: Prelude.Maybe Prelude.Text,
    -- | The number of days for which automated backups are retained. Setting
    -- this parameter to a positive number enables backups. Setting this
    -- parameter to 0 disables automated backups.
    --
    -- __Amazon Aurora__
    --
    -- Not applicable. The retention period for automated backups is managed by
    -- the DB cluster.
    --
    -- Default: 1
    --
    -- Constraints:
    --
    -- -   Must be a value from 0 to 35
    --
    -- -   Can\'t be set to 0 if the DB instance is a source to read replicas
    CreateDBInstance -> Maybe Int
backupRetentionPeriod :: Prelude.Maybe Prelude.Int,
    -- | The name of the NCHAR character set for the Oracle DB instance.
    CreateDBInstance -> Maybe Text
ncharCharacterSetName :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Web Services KMS key identifier for encryption of Performance
    -- Insights data.
    --
    -- 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).
    --
    -- If you do not specify a value for @PerformanceInsightsKMSKeyId@, then
    -- Amazon RDS uses 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.
    CreateDBInstance -> Maybe Text
performanceInsightsKMSKeyId :: Prelude.Maybe Prelude.Text,
    -- | A list of Amazon EC2 VPC security groups to associate with this DB
    -- instance.
    --
    -- __Amazon Aurora__
    --
    -- Not applicable. The associated list of EC2 VPC security groups is
    -- managed by the DB cluster.
    --
    -- Default: The default EC2 VPC security group for the DB subnet group\'s
    -- VPC.
    CreateDBInstance -> Maybe [Text]
vpcSecurityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | A value that indicates whether the DB instance is a Multi-AZ deployment.
    -- You can\'t set the @AvailabilityZone@ parameter if the DB instance is a
    -- Multi-AZ deployment.
    CreateDBInstance -> Maybe Bool
multiAZ :: Prelude.Maybe Prelude.Bool,
    -- | The amount of storage in gibibytes (GiB) to allocate for the DB
    -- instance.
    --
    -- Type: Integer
    --
    -- __Amazon Aurora__
    --
    -- Not applicable. Aurora cluster volumes automatically grow as the amount
    -- of data in your database increases, though you are only charged for the
    -- space that you use in an Aurora cluster volume.
    --
    -- __MySQL__
    --
    -- Constraints to the amount of storage for each storage type are the
    -- following:
    --
    -- -   General Purpose (SSD) storage (gp2): Must be an integer from 20 to
    --     65536.
    --
    -- -   Provisioned IOPS storage (io1): Must be an integer from 100 to
    --     65536.
    --
    -- -   Magnetic storage (standard): Must be an integer from 5 to 3072.
    --
    -- __MariaDB__
    --
    -- Constraints to the amount of storage for each storage type are the
    -- following:
    --
    -- -   General Purpose (SSD) storage (gp2): Must be an integer from 20 to
    --     65536.
    --
    -- -   Provisioned IOPS storage (io1): Must be an integer from 100 to
    --     65536.
    --
    -- -   Magnetic storage (standard): Must be an integer from 5 to 3072.
    --
    -- __PostgreSQL__
    --
    -- Constraints to the amount of storage for each storage type are the
    -- following:
    --
    -- -   General Purpose (SSD) storage (gp2): Must be an integer from 20 to
    --     65536.
    --
    -- -   Provisioned IOPS storage (io1): Must be an integer from 100 to
    --     65536.
    --
    -- -   Magnetic storage (standard): Must be an integer from 5 to 3072.
    --
    -- __Oracle__
    --
    -- Constraints to the amount of storage for each storage type are the
    -- following:
    --
    -- -   General Purpose (SSD) storage (gp2): Must be an integer from 20 to
    --     65536.
    --
    -- -   Provisioned IOPS storage (io1): Must be an integer from 100 to
    --     65536.
    --
    -- -   Magnetic storage (standard): Must be an integer from 10 to 3072.
    --
    -- __SQL Server__
    --
    -- Constraints to the amount of storage for each storage type are the
    -- following:
    --
    -- -   General Purpose (SSD) storage (gp2):
    --
    --     -   Enterprise and Standard editions: Must be an integer from 200 to
    --         16384.
    --
    --     -   Web and Express editions: Must be an integer from 20 to 16384.
    --
    -- -   Provisioned IOPS storage (io1):
    --
    --     -   Enterprise and Standard editions: Must be an integer from 200 to
    --         16384.
    --
    --     -   Web and Express editions: Must be an integer from 100 to 16384.
    --
    -- -   Magnetic storage (standard):
    --
    --     -   Enterprise and Standard editions: Must be an integer from 200 to
    --         1024.
    --
    --     -   Web and Express editions: Must be an integer from 20 to 1024.
    CreateDBInstance -> Maybe Int
allocatedStorage :: Prelude.Maybe Prelude.Int,
    -- | A value that indicates that the DB instance should be associated with
    -- the specified option group.
    --
    -- Permanent options, such as the TDE option for Oracle Advanced Security
    -- TDE, can\'t be removed from an option group. Also, that option group
    -- can\'t be removed from a DB instance once it is associated with a DB
    -- instance
    CreateDBInstance -> Maybe Text
optionGroupName :: Prelude.Maybe Prelude.Text,
    -- | A value that indicates whether to copy tags from the DB instance to
    -- snapshots of the DB instance. By default, tags are not copied.
    --
    -- __Amazon Aurora__
    --
    -- Not applicable. Copying tags to snapshots is managed by the DB cluster.
    -- Setting this value for an Aurora DB instance has no effect on the DB
    -- cluster setting.
    CreateDBInstance -> Maybe Bool
copyTagsToSnapshot :: Prelude.Maybe Prelude.Bool,
    -- | The time zone of the DB instance. The time zone parameter is currently
    -- supported only by
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html#SQLServer.Concepts.General.TimeZone Microsoft SQL Server>.
    CreateDBInstance -> Maybe Text
timezone :: Prelude.Maybe Prelude.Text,
    -- | The ARN from the key store with which to associate the instance for TDE
    -- encryption.
    CreateDBInstance -> Maybe Text
tdeCredentialArn :: Prelude.Maybe Prelude.Text,
    -- | Specify the name of the IAM role to be used when making API calls to the
    -- Directory Service.
    CreateDBInstance -> Maybe Text
domainIAMRoleName :: Prelude.Maybe Prelude.Text,
    -- | Tags to assign to the DB instance.
    CreateDBInstance -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The port number on which the database accepts connections.
    --
    -- __MySQL__
    --
    -- Default: @3306@
    --
    -- Valid values: @1150-65535@
    --
    -- Type: Integer
    --
    -- __MariaDB__
    --
    -- Default: @3306@
    --
    -- Valid values: @1150-65535@
    --
    -- Type: Integer
    --
    -- __PostgreSQL__
    --
    -- Default: @5432@
    --
    -- Valid values: @1150-65535@
    --
    -- Type: Integer
    --
    -- __Oracle__
    --
    -- Default: @1521@
    --
    -- Valid values: @1150-65535@
    --
    -- __SQL Server__
    --
    -- Default: @1433@
    --
    -- Valid values: @1150-65535@ except @1234@, @1434@, @3260@, @3343@,
    -- @3389@, @47001@, and @49152-49156@.
    --
    -- __Amazon Aurora__
    --
    -- Default: @3306@
    --
    -- Valid values: @1150-65535@
    --
    -- Type: Integer
    CreateDBInstance -> 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.
    --
    -- This setting doesn\'t apply to Amazon Aurora. Mapping Amazon Web
    -- Services IAM accounts to database accounts is managed by the DB cluster.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html IAM Database Authentication for MySQL and PostgreSQL>
    -- in the /Amazon RDS User Guide./
    CreateDBInstance -> Maybe Bool
enableIAMDatabaseAuthentication :: Prelude.Maybe Prelude.Bool,
    -- | Specifies the storage type to be associated with the DB instance.
    --
    -- Valid values: @standard | gp2 | io1@
    --
    -- If you specify @io1@, you must also include a value for the @Iops@
    -- parameter.
    --
    -- Default: @io1@ if the @Iops@ parameter is specified, otherwise @gp2@
    CreateDBInstance -> Maybe Text
storageType :: Prelude.Maybe Prelude.Text,
    -- | 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/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch Publishing Database Logs to Amazon CloudWatch Logs>
    -- in the /Amazon Relational Database Service User Guide/.
    --
    -- __Amazon Aurora__
    --
    -- Not applicable. CloudWatch Logs exports are managed by the DB cluster.
    --
    -- __MariaDB__
    --
    -- Possible values are @audit@, @error@, @general@, and @slowquery@.
    --
    -- __Microsoft SQL Server__
    --
    -- Possible values are @agent@ and @error@.
    --
    -- __MySQL__
    --
    -- Possible values are @audit@, @error@, @general@, and @slowquery@.
    --
    -- __Oracle__
    --
    -- Possible values are @alert@, @audit@, @listener@, @trace@, and
    -- @oemagent@.
    --
    -- __PostgreSQL__
    --
    -- Possible values are @postgresql@ and @upgrade@.
    CreateDBInstance -> Maybe [Text]
enableCloudwatchLogsExports :: Prelude.Maybe [Prelude.Text],
    -- | The meaning of this parameter differs according to the database engine
    -- you use.
    --
    -- __MySQL__
    --
    -- The name of the database to create when the DB instance is created. If
    -- this parameter isn\'t specified, no database is created in the DB
    -- instance.
    --
    -- Constraints:
    --
    -- -   Must contain 1 to 64 letters or numbers.
    --
    -- -   Must begin with a letter. Subsequent characters can be letters,
    --     underscores, or digits (0-9).
    --
    -- -   Can\'t be a word reserved by the specified database engine
    --
    -- __MariaDB__
    --
    -- The name of the database to create when the DB instance is created. If
    -- this parameter isn\'t specified, no database is created in the DB
    -- instance.
    --
    -- Constraints:
    --
    -- -   Must contain 1 to 64 letters or numbers.
    --
    -- -   Must begin with a letter. Subsequent characters can be letters,
    --     underscores, or digits (0-9).
    --
    -- -   Can\'t be a word reserved by the specified database engine
    --
    -- __PostgreSQL__
    --
    -- The name of the database to create when the DB instance is created. If
    -- this parameter isn\'t specified, a database named @postgres@ is created
    -- in the DB instance.
    --
    -- Constraints:
    --
    -- -   Must contain 1 to 63 letters, numbers, or underscores.
    --
    -- -   Must begin with a letter. Subsequent characters can be letters,
    --     underscores, or digits (0-9).
    --
    -- -   Can\'t be a word reserved by the specified database engine
    --
    -- __Oracle__
    --
    -- The Oracle System ID (SID) of the created DB instance. If you specify
    -- @null@, the default value @ORCL@ is used. You can\'t specify the string
    -- NULL, or any other reserved word, for @DBName@.
    --
    -- Default: @ORCL@
    --
    -- Constraints:
    --
    -- -   Can\'t be longer than 8 characters
    --
    -- __SQL Server__
    --
    -- Not applicable. Must be null.
    --
    -- __Amazon Aurora MySQL__
    --
    -- The name of the database to create when the primary DB instance of the
    -- Aurora MySQL DB cluster is created. If this parameter isn\'t specified
    -- for an Aurora MySQL DB cluster, no database is created in the DB
    -- cluster.
    --
    -- Constraints:
    --
    -- -   It must contain 1 to 64 alphanumeric characters.
    --
    -- -   It can\'t be a word reserved by the database engine.
    --
    -- __Amazon Aurora PostgreSQL__
    --
    -- The name of the database to create when the primary DB instance of the
    -- Aurora PostgreSQL DB cluster is created. If this parameter isn\'t
    -- specified for an Aurora PostgreSQL DB cluster, a database named
    -- @postgres@ is created in the DB cluster.
    --
    -- Constraints:
    --
    -- -   It must contain 1 to 63 alphanumeric characters.
    --
    -- -   It must begin with a letter or an underscore. Subsequent characters
    --     can be letters, underscores, or digits (0 to 9).
    --
    -- -   It can\'t be a word reserved by the database engine.
    CreateDBInstance -> Maybe Text
dbName :: Prelude.Maybe Prelude.Text,
    -- | The DB instance 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: @mydbinstance@
    CreateDBInstance -> Text
dbInstanceIdentifier :: Prelude.Text,
    -- | The compute and memory capacity of the DB instance, for example,
    -- @db.m4.large@. Not all DB instance classes are available in all Amazon
    -- Web Services Regions, or for all database engines. For the full list of
    -- DB instance classes, and availability for your engine, see
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html DB Instance Class>
    -- in the /Amazon RDS User Guide./
    CreateDBInstance -> Text
dbInstanceClass :: Prelude.Text,
    -- | The name of the database engine to be used for this instance.
    --
    -- Not every database engine is available for every Amazon Web Services
    -- Region.
    --
    -- Valid Values:
    --
    -- -   @aurora@ (for MySQL 5.6-compatible Aurora)
    --
    -- -   @aurora-mysql@ (for MySQL 5.7-compatible Aurora)
    --
    -- -   @aurora-postgresql@
    --
    -- -   @mariadb@
    --
    -- -   @mysql@
    --
    -- -   @oracle-ee@
    --
    -- -   @oracle-ee-cdb@
    --
    -- -   @oracle-se2@
    --
    -- -   @oracle-se2-cdb@
    --
    -- -   @postgres@
    --
    -- -   @sqlserver-ee@
    --
    -- -   @sqlserver-se@
    --
    -- -   @sqlserver-ex@
    --
    -- -   @sqlserver-web@
    CreateDBInstance -> Text
engine :: Prelude.Text
  }
  deriving (CreateDBInstance -> CreateDBInstance -> Bool
(CreateDBInstance -> CreateDBInstance -> Bool)
-> (CreateDBInstance -> CreateDBInstance -> Bool)
-> Eq CreateDBInstance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDBInstance -> CreateDBInstance -> Bool
$c/= :: CreateDBInstance -> CreateDBInstance -> Bool
== :: CreateDBInstance -> CreateDBInstance -> Bool
$c== :: CreateDBInstance -> CreateDBInstance -> Bool
Prelude.Eq, ReadPrec [CreateDBInstance]
ReadPrec CreateDBInstance
Int -> ReadS CreateDBInstance
ReadS [CreateDBInstance]
(Int -> ReadS CreateDBInstance)
-> ReadS [CreateDBInstance]
-> ReadPrec CreateDBInstance
-> ReadPrec [CreateDBInstance]
-> Read CreateDBInstance
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDBInstance]
$creadListPrec :: ReadPrec [CreateDBInstance]
readPrec :: ReadPrec CreateDBInstance
$creadPrec :: ReadPrec CreateDBInstance
readList :: ReadS [CreateDBInstance]
$creadList :: ReadS [CreateDBInstance]
readsPrec :: Int -> ReadS CreateDBInstance
$creadsPrec :: Int -> ReadS CreateDBInstance
Prelude.Read, Int -> CreateDBInstance -> ShowS
[CreateDBInstance] -> ShowS
CreateDBInstance -> String
(Int -> CreateDBInstance -> ShowS)
-> (CreateDBInstance -> String)
-> ([CreateDBInstance] -> ShowS)
-> Show CreateDBInstance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDBInstance] -> ShowS
$cshowList :: [CreateDBInstance] -> ShowS
show :: CreateDBInstance -> String
$cshow :: CreateDBInstance -> String
showsPrec :: Int -> CreateDBInstance -> ShowS
$cshowsPrec :: Int -> CreateDBInstance -> ShowS
Prelude.Show, (forall x. CreateDBInstance -> Rep CreateDBInstance x)
-> (forall x. Rep CreateDBInstance x -> CreateDBInstance)
-> Generic CreateDBInstance
forall x. Rep CreateDBInstance x -> CreateDBInstance
forall x. CreateDBInstance -> Rep CreateDBInstance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDBInstance x -> CreateDBInstance
$cfrom :: forall x. CreateDBInstance -> Rep CreateDBInstance x
Prelude.Generic)

-- |
-- Create a value of 'CreateDBInstance' 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', 'createDBInstance_engineVersion' - The version number of the database engine to use.
--
-- For a list of valid engine versions, use the @DescribeDBEngineVersions@
-- action.
--
-- The following are the database engines and links to information about
-- the major and minor versions that are available with Amazon RDS. Not
-- every database engine is available for every Amazon Web Services Region.
--
-- __Amazon Aurora__
--
-- Not applicable. The version number of the database engine to be used by
-- the DB instance is managed by the DB cluster.
--
-- __MariaDB__
--
-- See
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MariaDB.html#MariaDB.Concepts.VersionMgmt MariaDB on Amazon RDS Versions>
-- in the /Amazon RDS User Guide./
--
-- __Microsoft SQL Server__
--
-- See
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html#SQLServer.Concepts.General.VersionSupport Microsoft SQL Server Versions on Amazon RDS>
-- in the /Amazon RDS User Guide./
--
-- __MySQL__
--
-- See
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MySQL.html#MySQL.Concepts.VersionMgmt MySQL on Amazon RDS Versions>
-- in the /Amazon RDS User Guide./
--
-- __Oracle__
--
-- See
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.Oracle.PatchComposition.html Oracle Database Engine Release Notes>
-- in the /Amazon RDS User Guide./
--
-- __PostgreSQL__
--
-- See
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts Amazon RDS for PostgreSQL versions and extensions>
-- in the /Amazon RDS User Guide./
--
-- 'dbSecurityGroups', 'createDBInstance_dbSecurityGroups' - A list of DB security groups to associate with this DB instance.
--
-- Default: The default DB security group for the database engine.
--
-- 'deletionProtection', 'createDBInstance_deletionProtection' - A value that indicates whether the DB instance has deletion protection
-- enabled. The database can\'t be deleted when deletion protection is
-- enabled. By default, deletion protection is disabled. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html Deleting a DB Instance>.
--
-- __Amazon Aurora__
--
-- Not applicable. You can enable or disable deletion protection for the DB
-- cluster. For more information, see @CreateDBCluster@. DB instances in a
-- DB cluster can be deleted even when deletion protection is enabled for
-- the DB cluster.
--
-- 'storageEncrypted', 'createDBInstance_storageEncrypted' - A value that indicates whether the DB instance is encrypted. By default,
-- it isn\'t encrypted.
--
-- __Amazon Aurora__
--
-- Not applicable. The encryption for DB instances is managed by the DB
-- cluster.
--
-- 'dbClusterIdentifier', 'createDBInstance_dbClusterIdentifier' - The identifier of the DB cluster that the instance will belong to.
--
-- 'masterUserPassword', 'createDBInstance_masterUserPassword' - The password for the master user. The password can include any printable
-- ASCII character except \"\/\", \"\"\", or \"\@\".
--
-- __Amazon Aurora__
--
-- Not applicable. The password for the master user is managed by the DB
-- cluster.
--
-- __MariaDB__
--
-- Constraints: Must contain from 8 to 41 characters.
--
-- __Microsoft SQL Server__
--
-- Constraints: Must contain from 8 to 128 characters.
--
-- __MySQL__
--
-- Constraints: Must contain from 8 to 41 characters.
--
-- __Oracle__
--
-- Constraints: Must contain from 8 to 30 characters.
--
-- __PostgreSQL__
--
-- Constraints: Must contain from 8 to 128 characters.
--
-- 'publiclyAccessible', 'createDBInstance_publiclyAccessible' - A value that indicates whether the DB instance is publicly accessible.
--
-- When the DB instance is publicly accessible, its DNS endpoint resolves
-- to the private IP address from within the DB instance\'s VPC, and to the
-- public IP address from outside of the DB instance\'s VPC. Access to the
-- DB instance is ultimately controlled by the security group it uses, and
-- that public access is not permitted if the security group assigned to
-- the DB instance doesn\'t permit it.
--
-- When the DB instance isn\'t publicly accessible, it is an internal DB
-- instance with a DNS name that resolves to a private IP address.
--
-- Default: The default behavior varies depending on whether
-- @DBSubnetGroupName@ is specified.
--
-- If @DBSubnetGroupName@ isn\'t specified, and @PubliclyAccessible@ isn\'t
-- specified, the following applies:
--
-- -   If the default VPC in the target region doesn’t have an Internet
--     gateway attached to it, the DB instance is private.
--
-- -   If the default VPC in the target region has an Internet gateway
--     attached to it, the DB instance is public.
--
-- If @DBSubnetGroupName@ is specified, and @PubliclyAccessible@ isn\'t
-- specified, the following applies:
--
-- -   If the subnets are part of a VPC that doesn’t have an Internet
--     gateway attached to it, the DB instance is private.
--
-- -   If the subnets are part of a VPC that has an Internet gateway
--     attached to it, the DB instance is public.
--
-- 'autoMinorVersionUpgrade', 'createDBInstance_autoMinorVersionUpgrade' - A value that indicates whether minor engine upgrades are applied
-- automatically to the DB instance during the maintenance window. By
-- default, minor engine upgrades are applied automatically.
--
-- 'masterUsername', 'createDBInstance_masterUsername' - The name for the master user.
--
-- __Amazon Aurora__
--
-- Not applicable. The name for the master user is managed by the DB
-- cluster.
--
-- __MariaDB__
--
-- Constraints:
--
-- -   Required for MariaDB.
--
-- -   Must be 1 to 16 letters or numbers.
--
-- -   Can\'t be a reserved word for the chosen database engine.
--
-- __Microsoft SQL Server__
--
-- Constraints:
--
-- -   Required for SQL Server.
--
-- -   Must be 1 to 128 letters or numbers.
--
-- -   The first character must be a letter.
--
-- -   Can\'t be a reserved word for the chosen database engine.
--
-- __MySQL__
--
-- Constraints:
--
-- -   Required for MySQL.
--
-- -   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.
--
-- __Oracle__
--
-- Constraints:
--
-- -   Required for Oracle.
--
-- -   Must be 1 to 30 letters or numbers.
--
-- -   First character must be a letter.
--
-- -   Can\'t be a reserved word for the chosen database engine.
--
-- __PostgreSQL__
--
-- Constraints:
--
-- -   Required for PostgreSQL.
--
-- -   Must be 1 to 63 letters or numbers.
--
-- -   First character must be a letter.
--
-- -   Can\'t be a reserved word for the chosen database engine.
--
-- 'dbSubnetGroupName', 'createDBInstance_dbSubnetGroupName' - A DB subnet group to associate with this DB instance.
--
-- If there is no DB subnet group, then it is a non-VPC DB instance.
--
-- 'monitoringRoleArn', 'createDBInstance_monitoringRoleArn' - The ARN for the IAM role that permits RDS to send enhanced monitoring
-- metrics to Amazon CloudWatch Logs. For example,
-- @arn:aws:iam:123456789012:role\/emaccess@. For information on creating a
-- monitoring role, go to
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.html#USER_Monitoring.OS.Enabling Setting Up and Enabling Enhanced Monitoring>
-- in the /Amazon RDS User Guide/.
--
-- If @MonitoringInterval@ is set to a value other than 0, then you must
-- supply a @MonitoringRoleArn@ value.
--
-- 'iops', 'createDBInstance_iops' - The amount of Provisioned IOPS (input\/output operations per second) to
-- be initially allocated for the DB instance. For information about valid
-- Iops values, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS Amazon RDS Provisioned IOPS Storage to Improve Performance>
-- in the /Amazon RDS User Guide/.
--
-- Constraints: For MariaDB, MySQL, Oracle, and PostgreSQL DB instances,
-- must be a multiple between .5 and 50 of the storage amount for the DB
-- instance. For SQL Server DB instances, must be a multiple between 1 and
-- 50 of the storage amount for the DB instance.
--
-- 'domain', 'createDBInstance_domain' - The Active Directory directory ID to create the DB instance in.
-- Currently, only MySQL, Microsoft SQL Server, Oracle, and PostgreSQL DB
-- instances can be created in an Active Directory Domain.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/kerberos-authentication.html Kerberos Authentication>
-- in the /Amazon RDS User Guide/.
--
-- 'enableCustomerOwnedIp', 'createDBInstance_enableCustomerOwnedIp' - A value that indicates whether to enable a customer-owned IP address
-- (CoIP) for an RDS on Outposts DB instance.
--
-- A /CoIP/ provides local or external connectivity to resources in your
-- Outpost subnets through your on-premises network. For some use cases, a
-- CoIP can provide lower latency for connections to the DB instance from
-- outside of its virtual private cloud (VPC) on your local network.
--
-- For more information about RDS on Outposts, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html Working with Amazon RDS on Amazon Web Services Outposts>
-- in the /Amazon RDS User Guide/.
--
-- For more information about CoIPs, see
-- <https://docs.aws.amazon.com/outposts/latest/userguide/outposts-networking-components.html#ip-addressing Customer-owned IP addresses>
-- in the /Amazon Web Services Outposts User Guide/.
--
-- 'monitoringInterval', 'createDBInstance_monitoringInterval' - The interval, in seconds, between points when Enhanced Monitoring
-- metrics are collected for the DB instance. To disable collecting
-- Enhanced Monitoring metrics, specify 0. The default is 0.
--
-- If @MonitoringRoleArn@ is specified, then you must also set
-- @MonitoringInterval@ to a value other than 0.
--
-- Valid Values: @0, 1, 5, 10, 15, 30, 60@
--
-- 'tdeCredentialPassword', 'createDBInstance_tdeCredentialPassword' - The password for the given ARN from the key store in order to access the
-- device.
--
-- 'processorFeatures', 'createDBInstance_processorFeatures' - The number of CPU cores and the number of threads per core for the DB
-- instance class of the DB instance.
--
-- 'promotionTier', 'createDBInstance_promotionTier' - A value that specifies the order in which an Aurora Replica is promoted
-- to the primary instance after a failure of the existing primary
-- instance. For more information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.html#Aurora.Managing.FaultTolerance Fault Tolerance for an Aurora DB Cluster>
-- in the /Amazon Aurora User Guide/.
--
-- Default: 1
--
-- Valid Values: 0 - 15
--
-- 'licenseModel', 'createDBInstance_licenseModel' - License model information for this DB instance.
--
-- Valid values: @license-included@ | @bring-your-own-license@ |
-- @general-public-license@
--
-- 'preferredMaintenanceWindow', 'createDBInstance_preferredMaintenanceWindow' - The time range each week during which system maintenance can occur, in
-- Universal Coordinated Time (UTC). For more information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#Concepts.DBMaintenance Amazon RDS Maintenance Window>.
--
-- 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.
--
-- Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
--
-- Constraints: Minimum 30-minute window.
--
-- 'performanceInsightsRetentionPeriod', 'createDBInstance_performanceInsightsRetentionPeriod' - The amount of time, in days, to retain Performance Insights data. Valid
-- values are 7 or 731 (2 years).
--
-- 'characterSetName', 'createDBInstance_characterSetName' - For supported engines, indicates that the DB instance should be
-- associated with the specified CharacterSet.
--
-- __Amazon Aurora__
--
-- Not applicable. The character set is managed by the DB cluster. For more
-- information, see @CreateDBCluster@.
--
-- 'maxAllocatedStorage', 'createDBInstance_maxAllocatedStorage' - The upper limit in gibibytes (GiB) to which Amazon RDS can automatically
-- scale the storage of the DB instance.
--
-- For more information about this setting, including limitations that
-- apply to it, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIOPS.StorageTypes.html#USER_PIOPS.Autoscaling Managing capacity automatically with Amazon RDS storage autoscaling>
-- in the /Amazon RDS User Guide/.
--
-- 'enablePerformanceInsights', 'createDBInstance_enablePerformanceInsights' - A value that indicates whether to enable Performance Insights for the DB
-- instance.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html Using Amazon Performance Insights>
-- in the /Amazon Relational Database Service User Guide/.
--
-- 'kmsKeyId', 'createDBInstance_kmsKeyId' - The Amazon Web Services KMS key identifier for an encrypted DB instance.
--
-- 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.
--
-- __Amazon Aurora__
--
-- Not applicable. The Amazon Web Services KMS key identifier is managed by
-- the DB cluster. For more information, see @CreateDBCluster@.
--
-- If @StorageEncrypted@ is enabled, and you do not specify a value for the
-- @KmsKeyId@ parameter, then Amazon RDS uses 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.
--
-- 'dbParameterGroupName', 'createDBInstance_dbParameterGroupName' - The name of the DB parameter group to associate with this DB instance.
-- If you do not specify a value, then the default DB parameter group for
-- the specified DB engine and version is used.
--
-- Constraints:
--
-- -   Must be 1 to 255 letters, numbers, or hyphens.
--
-- -   First character must be a letter
--
-- -   Can\'t end with a hyphen or contain two consecutive hyphens
--
-- 'preferredBackupWindow', 'createDBInstance_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. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow Backup window>
-- in the /Amazon RDS User Guide/.
--
-- __Amazon Aurora__
--
-- Not applicable. The daily time range for creating automated backups is
-- managed by the DB cluster.
--
-- 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.
--
-- 'availabilityZone', 'createDBInstance_availabilityZone' - The Availability Zone (AZ) where the database will be created. For
-- information on Amazon Web Services Regions and Availability Zones, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html Regions and Availability Zones>.
--
-- Default: A random, system-chosen Availability Zone in the endpoint\'s
-- Amazon Web Services Region.
--
-- Example: @us-east-1d@
--
-- Constraint: The @AvailabilityZone@ parameter can\'t be specified if the
-- DB instance is a Multi-AZ deployment. The specified Availability Zone
-- must be in the same Amazon Web Services Region as the current endpoint.
--
-- If you\'re creating a DB instance in an RDS on VMware environment,
-- specify the identifier of the custom Availability Zone to create the DB
-- instance in.
--
-- For more information about RDS on VMware, see the
-- <https://docs.aws.amazon.com/AmazonRDS/latest/RDSonVMwareUserGuide/rds-on-vmware.html RDS on VMware User Guide.>
--
-- 'backupRetentionPeriod', 'createDBInstance_backupRetentionPeriod' - The number of days for which automated backups are retained. Setting
-- this parameter to a positive number enables backups. Setting this
-- parameter to 0 disables automated backups.
--
-- __Amazon Aurora__
--
-- Not applicable. The retention period for automated backups is managed by
-- the DB cluster.
--
-- Default: 1
--
-- Constraints:
--
-- -   Must be a value from 0 to 35
--
-- -   Can\'t be set to 0 if the DB instance is a source to read replicas
--
-- 'ncharCharacterSetName', 'createDBInstance_ncharCharacterSetName' - The name of the NCHAR character set for the Oracle DB instance.
--
-- 'performanceInsightsKMSKeyId', 'createDBInstance_performanceInsightsKMSKeyId' - The Amazon Web Services KMS key identifier for encryption of Performance
-- Insights data.
--
-- 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).
--
-- If you do not specify a value for @PerformanceInsightsKMSKeyId@, then
-- Amazon RDS uses 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.
--
-- 'vpcSecurityGroupIds', 'createDBInstance_vpcSecurityGroupIds' - A list of Amazon EC2 VPC security groups to associate with this DB
-- instance.
--
-- __Amazon Aurora__
--
-- Not applicable. The associated list of EC2 VPC security groups is
-- managed by the DB cluster.
--
-- Default: The default EC2 VPC security group for the DB subnet group\'s
-- VPC.
--
-- 'multiAZ', 'createDBInstance_multiAZ' - A value that indicates whether the DB instance is a Multi-AZ deployment.
-- You can\'t set the @AvailabilityZone@ parameter if the DB instance is a
-- Multi-AZ deployment.
--
-- 'allocatedStorage', 'createDBInstance_allocatedStorage' - The amount of storage in gibibytes (GiB) to allocate for the DB
-- instance.
--
-- Type: Integer
--
-- __Amazon Aurora__
--
-- Not applicable. Aurora cluster volumes automatically grow as the amount
-- of data in your database increases, though you are only charged for the
-- space that you use in an Aurora cluster volume.
--
-- __MySQL__
--
-- Constraints to the amount of storage for each storage type are the
-- following:
--
-- -   General Purpose (SSD) storage (gp2): Must be an integer from 20 to
--     65536.
--
-- -   Provisioned IOPS storage (io1): Must be an integer from 100 to
--     65536.
--
-- -   Magnetic storage (standard): Must be an integer from 5 to 3072.
--
-- __MariaDB__
--
-- Constraints to the amount of storage for each storage type are the
-- following:
--
-- -   General Purpose (SSD) storage (gp2): Must be an integer from 20 to
--     65536.
--
-- -   Provisioned IOPS storage (io1): Must be an integer from 100 to
--     65536.
--
-- -   Magnetic storage (standard): Must be an integer from 5 to 3072.
--
-- __PostgreSQL__
--
-- Constraints to the amount of storage for each storage type are the
-- following:
--
-- -   General Purpose (SSD) storage (gp2): Must be an integer from 20 to
--     65536.
--
-- -   Provisioned IOPS storage (io1): Must be an integer from 100 to
--     65536.
--
-- -   Magnetic storage (standard): Must be an integer from 5 to 3072.
--
-- __Oracle__
--
-- Constraints to the amount of storage for each storage type are the
-- following:
--
-- -   General Purpose (SSD) storage (gp2): Must be an integer from 20 to
--     65536.
--
-- -   Provisioned IOPS storage (io1): Must be an integer from 100 to
--     65536.
--
-- -   Magnetic storage (standard): Must be an integer from 10 to 3072.
--
-- __SQL Server__
--
-- Constraints to the amount of storage for each storage type are the
-- following:
--
-- -   General Purpose (SSD) storage (gp2):
--
--     -   Enterprise and Standard editions: Must be an integer from 200 to
--         16384.
--
--     -   Web and Express editions: Must be an integer from 20 to 16384.
--
-- -   Provisioned IOPS storage (io1):
--
--     -   Enterprise and Standard editions: Must be an integer from 200 to
--         16384.
--
--     -   Web and Express editions: Must be an integer from 100 to 16384.
--
-- -   Magnetic storage (standard):
--
--     -   Enterprise and Standard editions: Must be an integer from 200 to
--         1024.
--
--     -   Web and Express editions: Must be an integer from 20 to 1024.
--
-- 'optionGroupName', 'createDBInstance_optionGroupName' - A value that indicates that the DB instance should be associated with
-- the specified option group.
--
-- Permanent options, such as the TDE option for Oracle Advanced Security
-- TDE, can\'t be removed from an option group. Also, that option group
-- can\'t be removed from a DB instance once it is associated with a DB
-- instance
--
-- 'copyTagsToSnapshot', 'createDBInstance_copyTagsToSnapshot' - A value that indicates whether to copy tags from the DB instance to
-- snapshots of the DB instance. By default, tags are not copied.
--
-- __Amazon Aurora__
--
-- Not applicable. Copying tags to snapshots is managed by the DB cluster.
-- Setting this value for an Aurora DB instance has no effect on the DB
-- cluster setting.
--
-- 'timezone', 'createDBInstance_timezone' - The time zone of the DB instance. The time zone parameter is currently
-- supported only by
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html#SQLServer.Concepts.General.TimeZone Microsoft SQL Server>.
--
-- 'tdeCredentialArn', 'createDBInstance_tdeCredentialArn' - The ARN from the key store with which to associate the instance for TDE
-- encryption.
--
-- 'domainIAMRoleName', 'createDBInstance_domainIAMRoleName' - Specify the name of the IAM role to be used when making API calls to the
-- Directory Service.
--
-- 'tags', 'createDBInstance_tags' - Tags to assign to the DB instance.
--
-- 'port', 'createDBInstance_port' - The port number on which the database accepts connections.
--
-- __MySQL__
--
-- Default: @3306@
--
-- Valid values: @1150-65535@
--
-- Type: Integer
--
-- __MariaDB__
--
-- Default: @3306@
--
-- Valid values: @1150-65535@
--
-- Type: Integer
--
-- __PostgreSQL__
--
-- Default: @5432@
--
-- Valid values: @1150-65535@
--
-- Type: Integer
--
-- __Oracle__
--
-- Default: @1521@
--
-- Valid values: @1150-65535@
--
-- __SQL Server__
--
-- Default: @1433@
--
-- Valid values: @1150-65535@ except @1234@, @1434@, @3260@, @3343@,
-- @3389@, @47001@, and @49152-49156@.
--
-- __Amazon Aurora__
--
-- Default: @3306@
--
-- Valid values: @1150-65535@
--
-- Type: Integer
--
-- 'enableIAMDatabaseAuthentication', 'createDBInstance_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.
--
-- This setting doesn\'t apply to Amazon Aurora. Mapping Amazon Web
-- Services IAM accounts to database accounts is managed by the DB cluster.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html IAM Database Authentication for MySQL and PostgreSQL>
-- in the /Amazon RDS User Guide./
--
-- 'storageType', 'createDBInstance_storageType' - Specifies the storage type to be associated with the DB instance.
--
-- Valid values: @standard | gp2 | io1@
--
-- If you specify @io1@, you must also include a value for the @Iops@
-- parameter.
--
-- Default: @io1@ if the @Iops@ parameter is specified, otherwise @gp2@
--
-- 'enableCloudwatchLogsExports', 'createDBInstance_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/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch Publishing Database Logs to Amazon CloudWatch Logs>
-- in the /Amazon Relational Database Service User Guide/.
--
-- __Amazon Aurora__
--
-- Not applicable. CloudWatch Logs exports are managed by the DB cluster.
--
-- __MariaDB__
--
-- Possible values are @audit@, @error@, @general@, and @slowquery@.
--
-- __Microsoft SQL Server__
--
-- Possible values are @agent@ and @error@.
--
-- __MySQL__
--
-- Possible values are @audit@, @error@, @general@, and @slowquery@.
--
-- __Oracle__
--
-- Possible values are @alert@, @audit@, @listener@, @trace@, and
-- @oemagent@.
--
-- __PostgreSQL__
--
-- Possible values are @postgresql@ and @upgrade@.
--
-- 'dbName', 'createDBInstance_dbName' - The meaning of this parameter differs according to the database engine
-- you use.
--
-- __MySQL__
--
-- The name of the database to create when the DB instance is created. If
-- this parameter isn\'t specified, no database is created in the DB
-- instance.
--
-- Constraints:
--
-- -   Must contain 1 to 64 letters or numbers.
--
-- -   Must begin with a letter. Subsequent characters can be letters,
--     underscores, or digits (0-9).
--
-- -   Can\'t be a word reserved by the specified database engine
--
-- __MariaDB__
--
-- The name of the database to create when the DB instance is created. If
-- this parameter isn\'t specified, no database is created in the DB
-- instance.
--
-- Constraints:
--
-- -   Must contain 1 to 64 letters or numbers.
--
-- -   Must begin with a letter. Subsequent characters can be letters,
--     underscores, or digits (0-9).
--
-- -   Can\'t be a word reserved by the specified database engine
--
-- __PostgreSQL__
--
-- The name of the database to create when the DB instance is created. If
-- this parameter isn\'t specified, a database named @postgres@ is created
-- in the DB instance.
--
-- Constraints:
--
-- -   Must contain 1 to 63 letters, numbers, or underscores.
--
-- -   Must begin with a letter. Subsequent characters can be letters,
--     underscores, or digits (0-9).
--
-- -   Can\'t be a word reserved by the specified database engine
--
-- __Oracle__
--
-- The Oracle System ID (SID) of the created DB instance. If you specify
-- @null@, the default value @ORCL@ is used. You can\'t specify the string
-- NULL, or any other reserved word, for @DBName@.
--
-- Default: @ORCL@
--
-- Constraints:
--
-- -   Can\'t be longer than 8 characters
--
-- __SQL Server__
--
-- Not applicable. Must be null.
--
-- __Amazon Aurora MySQL__
--
-- The name of the database to create when the primary DB instance of the
-- Aurora MySQL DB cluster is created. If this parameter isn\'t specified
-- for an Aurora MySQL DB cluster, no database is created in the DB
-- cluster.
--
-- Constraints:
--
-- -   It must contain 1 to 64 alphanumeric characters.
--
-- -   It can\'t be a word reserved by the database engine.
--
-- __Amazon Aurora PostgreSQL__
--
-- The name of the database to create when the primary DB instance of the
-- Aurora PostgreSQL DB cluster is created. If this parameter isn\'t
-- specified for an Aurora PostgreSQL DB cluster, a database named
-- @postgres@ is created in the DB cluster.
--
-- Constraints:
--
-- -   It must contain 1 to 63 alphanumeric characters.
--
-- -   It must begin with a letter or an underscore. Subsequent characters
--     can be letters, underscores, or digits (0 to 9).
--
-- -   It can\'t be a word reserved by the database engine.
--
-- 'dbInstanceIdentifier', 'createDBInstance_dbInstanceIdentifier' - The DB instance 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: @mydbinstance@
--
-- 'dbInstanceClass', 'createDBInstance_dbInstanceClass' - The compute and memory capacity of the DB instance, for example,
-- @db.m4.large@. Not all DB instance classes are available in all Amazon
-- Web Services Regions, or for all database engines. For the full list of
-- DB instance classes, and availability for your engine, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html DB Instance Class>
-- in the /Amazon RDS User Guide./
--
-- 'engine', 'createDBInstance_engine' - The name of the database engine to be used for this instance.
--
-- Not every database engine is available for every Amazon Web Services
-- Region.
--
-- Valid Values:
--
-- -   @aurora@ (for MySQL 5.6-compatible Aurora)
--
-- -   @aurora-mysql@ (for MySQL 5.7-compatible Aurora)
--
-- -   @aurora-postgresql@
--
-- -   @mariadb@
--
-- -   @mysql@
--
-- -   @oracle-ee@
--
-- -   @oracle-ee-cdb@
--
-- -   @oracle-se2@
--
-- -   @oracle-se2-cdb@
--
-- -   @postgres@
--
-- -   @sqlserver-ee@
--
-- -   @sqlserver-se@
--
-- -   @sqlserver-ex@
--
-- -   @sqlserver-web@
newCreateDBInstance ::
  -- | 'dbInstanceIdentifier'
  Prelude.Text ->
  -- | 'dbInstanceClass'
  Prelude.Text ->
  -- | 'engine'
  Prelude.Text ->
  CreateDBInstance
newCreateDBInstance :: Text -> Text -> Text -> CreateDBInstance
newCreateDBInstance
  Text
pDBInstanceIdentifier_
  Text
pDBInstanceClass_
  Text
pEngine_ =
    CreateDBInstance' :: Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe [ProcessorFeature]
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> Text
-> Text
-> CreateDBInstance
CreateDBInstance'
      { $sel:engineVersion:CreateDBInstance' :: Maybe Text
engineVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:dbSecurityGroups:CreateDBInstance' :: Maybe [Text]
dbSecurityGroups = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:deletionProtection:CreateDBInstance' :: Maybe Bool
deletionProtection = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:storageEncrypted:CreateDBInstance' :: Maybe Bool
storageEncrypted = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:dbClusterIdentifier:CreateDBInstance' :: Maybe Text
dbClusterIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:masterUserPassword:CreateDBInstance' :: Maybe Text
masterUserPassword = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:publiclyAccessible:CreateDBInstance' :: Maybe Bool
publiclyAccessible = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:autoMinorVersionUpgrade:CreateDBInstance' :: Maybe Bool
autoMinorVersionUpgrade = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:masterUsername:CreateDBInstance' :: Maybe Text
masterUsername = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:dbSubnetGroupName:CreateDBInstance' :: Maybe Text
dbSubnetGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:monitoringRoleArn:CreateDBInstance' :: Maybe Text
monitoringRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:iops:CreateDBInstance' :: Maybe Int
iops = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:domain:CreateDBInstance' :: Maybe Text
domain = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:enableCustomerOwnedIp:CreateDBInstance' :: Maybe Bool
enableCustomerOwnedIp = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:monitoringInterval:CreateDBInstance' :: Maybe Int
monitoringInterval = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:tdeCredentialPassword:CreateDBInstance' :: Maybe Text
tdeCredentialPassword = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:processorFeatures:CreateDBInstance' :: Maybe [ProcessorFeature]
processorFeatures = Maybe [ProcessorFeature]
forall a. Maybe a
Prelude.Nothing,
        $sel:promotionTier:CreateDBInstance' :: Maybe Int
promotionTier = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:licenseModel:CreateDBInstance' :: Maybe Text
licenseModel = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:preferredMaintenanceWindow:CreateDBInstance' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:performanceInsightsRetentionPeriod:CreateDBInstance' :: Maybe Int
performanceInsightsRetentionPeriod = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:characterSetName:CreateDBInstance' :: Maybe Text
characterSetName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:maxAllocatedStorage:CreateDBInstance' :: Maybe Int
maxAllocatedStorage = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:enablePerformanceInsights:CreateDBInstance' :: Maybe Bool
enablePerformanceInsights = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:kmsKeyId:CreateDBInstance' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:dbParameterGroupName:CreateDBInstance' :: Maybe Text
dbParameterGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:preferredBackupWindow:CreateDBInstance' :: Maybe Text
preferredBackupWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:availabilityZone:CreateDBInstance' :: Maybe Text
availabilityZone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:backupRetentionPeriod:CreateDBInstance' :: Maybe Int
backupRetentionPeriod = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:ncharCharacterSetName:CreateDBInstance' :: Maybe Text
ncharCharacterSetName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:performanceInsightsKMSKeyId:CreateDBInstance' :: Maybe Text
performanceInsightsKMSKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:vpcSecurityGroupIds:CreateDBInstance' :: Maybe [Text]
vpcSecurityGroupIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:multiAZ:CreateDBInstance' :: Maybe Bool
multiAZ = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:allocatedStorage:CreateDBInstance' :: Maybe Int
allocatedStorage = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:optionGroupName:CreateDBInstance' :: Maybe Text
optionGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:copyTagsToSnapshot:CreateDBInstance' :: Maybe Bool
copyTagsToSnapshot = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:timezone:CreateDBInstance' :: Maybe Text
timezone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tdeCredentialArn:CreateDBInstance' :: Maybe Text
tdeCredentialArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:domainIAMRoleName:CreateDBInstance' :: Maybe Text
domainIAMRoleName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateDBInstance' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:port:CreateDBInstance' :: Maybe Int
port = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:enableIAMDatabaseAuthentication:CreateDBInstance' :: Maybe Bool
enableIAMDatabaseAuthentication = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:storageType:CreateDBInstance' :: Maybe Text
storageType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:enableCloudwatchLogsExports:CreateDBInstance' :: Maybe [Text]
enableCloudwatchLogsExports = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:dbName:CreateDBInstance' :: Maybe Text
dbName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:dbInstanceIdentifier:CreateDBInstance' :: Text
dbInstanceIdentifier = Text
pDBInstanceIdentifier_,
        $sel:dbInstanceClass:CreateDBInstance' :: Text
dbInstanceClass = Text
pDBInstanceClass_,
        $sel:engine:CreateDBInstance' :: Text
engine = Text
pEngine_
      }

-- | The version number of the database engine to use.
--
-- For a list of valid engine versions, use the @DescribeDBEngineVersions@
-- action.
--
-- The following are the database engines and links to information about
-- the major and minor versions that are available with Amazon RDS. Not
-- every database engine is available for every Amazon Web Services Region.
--
-- __Amazon Aurora__
--
-- Not applicable. The version number of the database engine to be used by
-- the DB instance is managed by the DB cluster.
--
-- __MariaDB__
--
-- See
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MariaDB.html#MariaDB.Concepts.VersionMgmt MariaDB on Amazon RDS Versions>
-- in the /Amazon RDS User Guide./
--
-- __Microsoft SQL Server__
--
-- See
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html#SQLServer.Concepts.General.VersionSupport Microsoft SQL Server Versions on Amazon RDS>
-- in the /Amazon RDS User Guide./
--
-- __MySQL__
--
-- See
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MySQL.html#MySQL.Concepts.VersionMgmt MySQL on Amazon RDS Versions>
-- in the /Amazon RDS User Guide./
--
-- __Oracle__
--
-- See
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.Oracle.PatchComposition.html Oracle Database Engine Release Notes>
-- in the /Amazon RDS User Guide./
--
-- __PostgreSQL__
--
-- See
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts Amazon RDS for PostgreSQL versions and extensions>
-- in the /Amazon RDS User Guide./
createDBInstance_engineVersion :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Text)
createDBInstance_engineVersion :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_engineVersion = (CreateDBInstance -> Maybe Text)
-> (CreateDBInstance -> Maybe Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:CreateDBInstance' :: CreateDBInstance -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Text
a -> CreateDBInstance
s {$sel:engineVersion:CreateDBInstance' :: Maybe Text
engineVersion = Maybe Text
a} :: CreateDBInstance)

-- | A list of DB security groups to associate with this DB instance.
--
-- Default: The default DB security group for the database engine.
createDBInstance_dbSecurityGroups :: Lens.Lens' CreateDBInstance (Prelude.Maybe [Prelude.Text])
createDBInstance_dbSecurityGroups :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_dbSecurityGroups = (CreateDBInstance -> Maybe [Text])
-> (CreateDBInstance -> Maybe [Text] -> CreateDBInstance)
-> Lens
     CreateDBInstance CreateDBInstance (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe [Text]
dbSecurityGroups :: Maybe [Text]
$sel:dbSecurityGroups:CreateDBInstance' :: CreateDBInstance -> Maybe [Text]
dbSecurityGroups} -> Maybe [Text]
dbSecurityGroups) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe [Text]
a -> CreateDBInstance
s {$sel:dbSecurityGroups:CreateDBInstance' :: Maybe [Text]
dbSecurityGroups = Maybe [Text]
a} :: CreateDBInstance) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateDBInstance -> f CreateDBInstance)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateDBInstance
-> f CreateDBInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A value that indicates whether the DB instance has deletion protection
-- enabled. The database can\'t be deleted when deletion protection is
-- enabled. By default, deletion protection is disabled. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html Deleting a DB Instance>.
--
-- __Amazon Aurora__
--
-- Not applicable. You can enable or disable deletion protection for the DB
-- cluster. For more information, see @CreateDBCluster@. DB instances in a
-- DB cluster can be deleted even when deletion protection is enabled for
-- the DB cluster.
createDBInstance_deletionProtection :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Bool)
createDBInstance_deletionProtection :: (Maybe Bool -> f (Maybe Bool))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_deletionProtection = (CreateDBInstance -> Maybe Bool)
-> (CreateDBInstance -> Maybe Bool -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Bool
deletionProtection :: Maybe Bool
$sel:deletionProtection:CreateDBInstance' :: CreateDBInstance -> Maybe Bool
deletionProtection} -> Maybe Bool
deletionProtection) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Bool
a -> CreateDBInstance
s {$sel:deletionProtection:CreateDBInstance' :: Maybe Bool
deletionProtection = Maybe Bool
a} :: CreateDBInstance)

-- | A value that indicates whether the DB instance is encrypted. By default,
-- it isn\'t encrypted.
--
-- __Amazon Aurora__
--
-- Not applicable. The encryption for DB instances is managed by the DB
-- cluster.
createDBInstance_storageEncrypted :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Bool)
createDBInstance_storageEncrypted :: (Maybe Bool -> f (Maybe Bool))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_storageEncrypted = (CreateDBInstance -> Maybe Bool)
-> (CreateDBInstance -> Maybe Bool -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Bool
storageEncrypted :: Maybe Bool
$sel:storageEncrypted:CreateDBInstance' :: CreateDBInstance -> Maybe Bool
storageEncrypted} -> Maybe Bool
storageEncrypted) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Bool
a -> CreateDBInstance
s {$sel:storageEncrypted:CreateDBInstance' :: Maybe Bool
storageEncrypted = Maybe Bool
a} :: CreateDBInstance)

-- | The identifier of the DB cluster that the instance will belong to.
createDBInstance_dbClusterIdentifier :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Text)
createDBInstance_dbClusterIdentifier :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_dbClusterIdentifier = (CreateDBInstance -> Maybe Text)
-> (CreateDBInstance -> Maybe Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Text
dbClusterIdentifier :: Maybe Text
$sel:dbClusterIdentifier:CreateDBInstance' :: CreateDBInstance -> Maybe Text
dbClusterIdentifier} -> Maybe Text
dbClusterIdentifier) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Text
a -> CreateDBInstance
s {$sel:dbClusterIdentifier:CreateDBInstance' :: Maybe Text
dbClusterIdentifier = Maybe Text
a} :: CreateDBInstance)

-- | The password for the master user. The password can include any printable
-- ASCII character except \"\/\", \"\"\", or \"\@\".
--
-- __Amazon Aurora__
--
-- Not applicable. The password for the master user is managed by the DB
-- cluster.
--
-- __MariaDB__
--
-- Constraints: Must contain from 8 to 41 characters.
--
-- __Microsoft SQL Server__
--
-- Constraints: Must contain from 8 to 128 characters.
--
-- __MySQL__
--
-- Constraints: Must contain from 8 to 41 characters.
--
-- __Oracle__
--
-- Constraints: Must contain from 8 to 30 characters.
--
-- __PostgreSQL__
--
-- Constraints: Must contain from 8 to 128 characters.
createDBInstance_masterUserPassword :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Text)
createDBInstance_masterUserPassword :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_masterUserPassword = (CreateDBInstance -> Maybe Text)
-> (CreateDBInstance -> Maybe Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Text
masterUserPassword :: Maybe Text
$sel:masterUserPassword:CreateDBInstance' :: CreateDBInstance -> Maybe Text
masterUserPassword} -> Maybe Text
masterUserPassword) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Text
a -> CreateDBInstance
s {$sel:masterUserPassword:CreateDBInstance' :: Maybe Text
masterUserPassword = Maybe Text
a} :: CreateDBInstance)

-- | A value that indicates whether the DB instance is publicly accessible.
--
-- When the DB instance is publicly accessible, its DNS endpoint resolves
-- to the private IP address from within the DB instance\'s VPC, and to the
-- public IP address from outside of the DB instance\'s VPC. Access to the
-- DB instance is ultimately controlled by the security group it uses, and
-- that public access is not permitted if the security group assigned to
-- the DB instance doesn\'t permit it.
--
-- When the DB instance isn\'t publicly accessible, it is an internal DB
-- instance with a DNS name that resolves to a private IP address.
--
-- Default: The default behavior varies depending on whether
-- @DBSubnetGroupName@ is specified.
--
-- If @DBSubnetGroupName@ isn\'t specified, and @PubliclyAccessible@ isn\'t
-- specified, the following applies:
--
-- -   If the default VPC in the target region doesn’t have an Internet
--     gateway attached to it, the DB instance is private.
--
-- -   If the default VPC in the target region has an Internet gateway
--     attached to it, the DB instance is public.
--
-- If @DBSubnetGroupName@ is specified, and @PubliclyAccessible@ isn\'t
-- specified, the following applies:
--
-- -   If the subnets are part of a VPC that doesn’t have an Internet
--     gateway attached to it, the DB instance is private.
--
-- -   If the subnets are part of a VPC that has an Internet gateway
--     attached to it, the DB instance is public.
createDBInstance_publiclyAccessible :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Bool)
createDBInstance_publiclyAccessible :: (Maybe Bool -> f (Maybe Bool))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_publiclyAccessible = (CreateDBInstance -> Maybe Bool)
-> (CreateDBInstance -> Maybe Bool -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Bool
publiclyAccessible :: Maybe Bool
$sel:publiclyAccessible:CreateDBInstance' :: CreateDBInstance -> Maybe Bool
publiclyAccessible} -> Maybe Bool
publiclyAccessible) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Bool
a -> CreateDBInstance
s {$sel:publiclyAccessible:CreateDBInstance' :: Maybe Bool
publiclyAccessible = Maybe Bool
a} :: CreateDBInstance)

-- | A value that indicates whether minor engine upgrades are applied
-- automatically to the DB instance during the maintenance window. By
-- default, minor engine upgrades are applied automatically.
createDBInstance_autoMinorVersionUpgrade :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Bool)
createDBInstance_autoMinorVersionUpgrade :: (Maybe Bool -> f (Maybe Bool))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_autoMinorVersionUpgrade = (CreateDBInstance -> Maybe Bool)
-> (CreateDBInstance -> Maybe Bool -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Bool
autoMinorVersionUpgrade :: Maybe Bool
$sel:autoMinorVersionUpgrade:CreateDBInstance' :: CreateDBInstance -> Maybe Bool
autoMinorVersionUpgrade} -> Maybe Bool
autoMinorVersionUpgrade) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Bool
a -> CreateDBInstance
s {$sel:autoMinorVersionUpgrade:CreateDBInstance' :: Maybe Bool
autoMinorVersionUpgrade = Maybe Bool
a} :: CreateDBInstance)

-- | The name for the master user.
--
-- __Amazon Aurora__
--
-- Not applicable. The name for the master user is managed by the DB
-- cluster.
--
-- __MariaDB__
--
-- Constraints:
--
-- -   Required for MariaDB.
--
-- -   Must be 1 to 16 letters or numbers.
--
-- -   Can\'t be a reserved word for the chosen database engine.
--
-- __Microsoft SQL Server__
--
-- Constraints:
--
-- -   Required for SQL Server.
--
-- -   Must be 1 to 128 letters or numbers.
--
-- -   The first character must be a letter.
--
-- -   Can\'t be a reserved word for the chosen database engine.
--
-- __MySQL__
--
-- Constraints:
--
-- -   Required for MySQL.
--
-- -   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.
--
-- __Oracle__
--
-- Constraints:
--
-- -   Required for Oracle.
--
-- -   Must be 1 to 30 letters or numbers.
--
-- -   First character must be a letter.
--
-- -   Can\'t be a reserved word for the chosen database engine.
--
-- __PostgreSQL__
--
-- Constraints:
--
-- -   Required for PostgreSQL.
--
-- -   Must be 1 to 63 letters or numbers.
--
-- -   First character must be a letter.
--
-- -   Can\'t be a reserved word for the chosen database engine.
createDBInstance_masterUsername :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Text)
createDBInstance_masterUsername :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_masterUsername = (CreateDBInstance -> Maybe Text)
-> (CreateDBInstance -> Maybe Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Text
masterUsername :: Maybe Text
$sel:masterUsername:CreateDBInstance' :: CreateDBInstance -> Maybe Text
masterUsername} -> Maybe Text
masterUsername) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Text
a -> CreateDBInstance
s {$sel:masterUsername:CreateDBInstance' :: Maybe Text
masterUsername = Maybe Text
a} :: CreateDBInstance)

-- | A DB subnet group to associate with this DB instance.
--
-- If there is no DB subnet group, then it is a non-VPC DB instance.
createDBInstance_dbSubnetGroupName :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Text)
createDBInstance_dbSubnetGroupName :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_dbSubnetGroupName = (CreateDBInstance -> Maybe Text)
-> (CreateDBInstance -> Maybe Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Text
dbSubnetGroupName :: Maybe Text
$sel:dbSubnetGroupName:CreateDBInstance' :: CreateDBInstance -> Maybe Text
dbSubnetGroupName} -> Maybe Text
dbSubnetGroupName) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Text
a -> CreateDBInstance
s {$sel:dbSubnetGroupName:CreateDBInstance' :: Maybe Text
dbSubnetGroupName = Maybe Text
a} :: CreateDBInstance)

-- | The ARN for the IAM role that permits RDS to send enhanced monitoring
-- metrics to Amazon CloudWatch Logs. For example,
-- @arn:aws:iam:123456789012:role\/emaccess@. For information on creating a
-- monitoring role, go to
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.html#USER_Monitoring.OS.Enabling Setting Up and Enabling Enhanced Monitoring>
-- in the /Amazon RDS User Guide/.
--
-- If @MonitoringInterval@ is set to a value other than 0, then you must
-- supply a @MonitoringRoleArn@ value.
createDBInstance_monitoringRoleArn :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Text)
createDBInstance_monitoringRoleArn :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_monitoringRoleArn = (CreateDBInstance -> Maybe Text)
-> (CreateDBInstance -> Maybe Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Text
monitoringRoleArn :: Maybe Text
$sel:monitoringRoleArn:CreateDBInstance' :: CreateDBInstance -> Maybe Text
monitoringRoleArn} -> Maybe Text
monitoringRoleArn) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Text
a -> CreateDBInstance
s {$sel:monitoringRoleArn:CreateDBInstance' :: Maybe Text
monitoringRoleArn = Maybe Text
a} :: CreateDBInstance)

-- | The amount of Provisioned IOPS (input\/output operations per second) to
-- be initially allocated for the DB instance. For information about valid
-- Iops values, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS Amazon RDS Provisioned IOPS Storage to Improve Performance>
-- in the /Amazon RDS User Guide/.
--
-- Constraints: For MariaDB, MySQL, Oracle, and PostgreSQL DB instances,
-- must be a multiple between .5 and 50 of the storage amount for the DB
-- instance. For SQL Server DB instances, must be a multiple between 1 and
-- 50 of the storage amount for the DB instance.
createDBInstance_iops :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Int)
createDBInstance_iops :: (Maybe Int -> f (Maybe Int))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_iops = (CreateDBInstance -> Maybe Int)
-> (CreateDBInstance -> Maybe Int -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Int
iops :: Maybe Int
$sel:iops:CreateDBInstance' :: CreateDBInstance -> Maybe Int
iops} -> Maybe Int
iops) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Int
a -> CreateDBInstance
s {$sel:iops:CreateDBInstance' :: Maybe Int
iops = Maybe Int
a} :: CreateDBInstance)

-- | The Active Directory directory ID to create the DB instance in.
-- Currently, only MySQL, Microsoft SQL Server, Oracle, and PostgreSQL DB
-- instances can be created in an Active Directory Domain.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/kerberos-authentication.html Kerberos Authentication>
-- in the /Amazon RDS User Guide/.
createDBInstance_domain :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Text)
createDBInstance_domain :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_domain = (CreateDBInstance -> Maybe Text)
-> (CreateDBInstance -> Maybe Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Text
domain :: Maybe Text
$sel:domain:CreateDBInstance' :: CreateDBInstance -> Maybe Text
domain} -> Maybe Text
domain) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Text
a -> CreateDBInstance
s {$sel:domain:CreateDBInstance' :: Maybe Text
domain = Maybe Text
a} :: CreateDBInstance)

-- | A value that indicates whether to enable a customer-owned IP address
-- (CoIP) for an RDS on Outposts DB instance.
--
-- A /CoIP/ provides local or external connectivity to resources in your
-- Outpost subnets through your on-premises network. For some use cases, a
-- CoIP can provide lower latency for connections to the DB instance from
-- outside of its virtual private cloud (VPC) on your local network.
--
-- For more information about RDS on Outposts, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html Working with Amazon RDS on Amazon Web Services Outposts>
-- in the /Amazon RDS User Guide/.
--
-- For more information about CoIPs, see
-- <https://docs.aws.amazon.com/outposts/latest/userguide/outposts-networking-components.html#ip-addressing Customer-owned IP addresses>
-- in the /Amazon Web Services Outposts User Guide/.
createDBInstance_enableCustomerOwnedIp :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Bool)
createDBInstance_enableCustomerOwnedIp :: (Maybe Bool -> f (Maybe Bool))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_enableCustomerOwnedIp = (CreateDBInstance -> Maybe Bool)
-> (CreateDBInstance -> Maybe Bool -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Bool
enableCustomerOwnedIp :: Maybe Bool
$sel:enableCustomerOwnedIp:CreateDBInstance' :: CreateDBInstance -> Maybe Bool
enableCustomerOwnedIp} -> Maybe Bool
enableCustomerOwnedIp) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Bool
a -> CreateDBInstance
s {$sel:enableCustomerOwnedIp:CreateDBInstance' :: Maybe Bool
enableCustomerOwnedIp = Maybe Bool
a} :: CreateDBInstance)

-- | The interval, in seconds, between points when Enhanced Monitoring
-- metrics are collected for the DB instance. To disable collecting
-- Enhanced Monitoring metrics, specify 0. The default is 0.
--
-- If @MonitoringRoleArn@ is specified, then you must also set
-- @MonitoringInterval@ to a value other than 0.
--
-- Valid Values: @0, 1, 5, 10, 15, 30, 60@
createDBInstance_monitoringInterval :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Int)
createDBInstance_monitoringInterval :: (Maybe Int -> f (Maybe Int))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_monitoringInterval = (CreateDBInstance -> Maybe Int)
-> (CreateDBInstance -> Maybe Int -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Int
monitoringInterval :: Maybe Int
$sel:monitoringInterval:CreateDBInstance' :: CreateDBInstance -> Maybe Int
monitoringInterval} -> Maybe Int
monitoringInterval) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Int
a -> CreateDBInstance
s {$sel:monitoringInterval:CreateDBInstance' :: Maybe Int
monitoringInterval = Maybe Int
a} :: CreateDBInstance)

-- | The password for the given ARN from the key store in order to access the
-- device.
createDBInstance_tdeCredentialPassword :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Text)
createDBInstance_tdeCredentialPassword :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_tdeCredentialPassword = (CreateDBInstance -> Maybe Text)
-> (CreateDBInstance -> Maybe Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Text
tdeCredentialPassword :: Maybe Text
$sel:tdeCredentialPassword:CreateDBInstance' :: CreateDBInstance -> Maybe Text
tdeCredentialPassword} -> Maybe Text
tdeCredentialPassword) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Text
a -> CreateDBInstance
s {$sel:tdeCredentialPassword:CreateDBInstance' :: Maybe Text
tdeCredentialPassword = Maybe Text
a} :: CreateDBInstance)

-- | The number of CPU cores and the number of threads per core for the DB
-- instance class of the DB instance.
createDBInstance_processorFeatures :: Lens.Lens' CreateDBInstance (Prelude.Maybe [ProcessorFeature])
createDBInstance_processorFeatures :: (Maybe [ProcessorFeature] -> f (Maybe [ProcessorFeature]))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_processorFeatures = (CreateDBInstance -> Maybe [ProcessorFeature])
-> (CreateDBInstance
    -> Maybe [ProcessorFeature] -> CreateDBInstance)
-> Lens
     CreateDBInstance
     CreateDBInstance
     (Maybe [ProcessorFeature])
     (Maybe [ProcessorFeature])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe [ProcessorFeature]
processorFeatures :: Maybe [ProcessorFeature]
$sel:processorFeatures:CreateDBInstance' :: CreateDBInstance -> Maybe [ProcessorFeature]
processorFeatures} -> Maybe [ProcessorFeature]
processorFeatures) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe [ProcessorFeature]
a -> CreateDBInstance
s {$sel:processorFeatures:CreateDBInstance' :: Maybe [ProcessorFeature]
processorFeatures = Maybe [ProcessorFeature]
a} :: CreateDBInstance) ((Maybe [ProcessorFeature] -> f (Maybe [ProcessorFeature]))
 -> CreateDBInstance -> f CreateDBInstance)
-> ((Maybe [ProcessorFeature] -> f (Maybe [ProcessorFeature]))
    -> Maybe [ProcessorFeature] -> f (Maybe [ProcessorFeature]))
-> (Maybe [ProcessorFeature] -> f (Maybe [ProcessorFeature]))
-> CreateDBInstance
-> f CreateDBInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ProcessorFeature]
  [ProcessorFeature]
  [ProcessorFeature]
  [ProcessorFeature]
-> Iso
     (Maybe [ProcessorFeature])
     (Maybe [ProcessorFeature])
     (Maybe [ProcessorFeature])
     (Maybe [ProcessorFeature])
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
  [ProcessorFeature]
  [ProcessorFeature]
  [ProcessorFeature]
  [ProcessorFeature]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A value that specifies the order in which an Aurora Replica is promoted
-- to the primary instance after a failure of the existing primary
-- instance. For more information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.html#Aurora.Managing.FaultTolerance Fault Tolerance for an Aurora DB Cluster>
-- in the /Amazon Aurora User Guide/.
--
-- Default: 1
--
-- Valid Values: 0 - 15
createDBInstance_promotionTier :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Int)
createDBInstance_promotionTier :: (Maybe Int -> f (Maybe Int))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_promotionTier = (CreateDBInstance -> Maybe Int)
-> (CreateDBInstance -> Maybe Int -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Int
promotionTier :: Maybe Int
$sel:promotionTier:CreateDBInstance' :: CreateDBInstance -> Maybe Int
promotionTier} -> Maybe Int
promotionTier) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Int
a -> CreateDBInstance
s {$sel:promotionTier:CreateDBInstance' :: Maybe Int
promotionTier = Maybe Int
a} :: CreateDBInstance)

-- | License model information for this DB instance.
--
-- Valid values: @license-included@ | @bring-your-own-license@ |
-- @general-public-license@
createDBInstance_licenseModel :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Text)
createDBInstance_licenseModel :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_licenseModel = (CreateDBInstance -> Maybe Text)
-> (CreateDBInstance -> Maybe Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Text
licenseModel :: Maybe Text
$sel:licenseModel:CreateDBInstance' :: CreateDBInstance -> Maybe Text
licenseModel} -> Maybe Text
licenseModel) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Text
a -> CreateDBInstance
s {$sel:licenseModel:CreateDBInstance' :: Maybe Text
licenseModel = Maybe Text
a} :: CreateDBInstance)

-- | The time range each week during which system maintenance can occur, in
-- Universal Coordinated Time (UTC). For more information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#Concepts.DBMaintenance Amazon RDS Maintenance Window>.
--
-- 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.
--
-- Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
--
-- Constraints: Minimum 30-minute window.
createDBInstance_preferredMaintenanceWindow :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Text)
createDBInstance_preferredMaintenanceWindow :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_preferredMaintenanceWindow = (CreateDBInstance -> Maybe Text)
-> (CreateDBInstance -> Maybe Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Text
preferredMaintenanceWindow :: Maybe Text
$sel:preferredMaintenanceWindow:CreateDBInstance' :: CreateDBInstance -> Maybe Text
preferredMaintenanceWindow} -> Maybe Text
preferredMaintenanceWindow) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Text
a -> CreateDBInstance
s {$sel:preferredMaintenanceWindow:CreateDBInstance' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
a} :: CreateDBInstance)

-- | The amount of time, in days, to retain Performance Insights data. Valid
-- values are 7 or 731 (2 years).
createDBInstance_performanceInsightsRetentionPeriod :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Int)
createDBInstance_performanceInsightsRetentionPeriod :: (Maybe Int -> f (Maybe Int))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_performanceInsightsRetentionPeriod = (CreateDBInstance -> Maybe Int)
-> (CreateDBInstance -> Maybe Int -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Int
performanceInsightsRetentionPeriod :: Maybe Int
$sel:performanceInsightsRetentionPeriod:CreateDBInstance' :: CreateDBInstance -> Maybe Int
performanceInsightsRetentionPeriod} -> Maybe Int
performanceInsightsRetentionPeriod) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Int
a -> CreateDBInstance
s {$sel:performanceInsightsRetentionPeriod:CreateDBInstance' :: Maybe Int
performanceInsightsRetentionPeriod = Maybe Int
a} :: CreateDBInstance)

-- | For supported engines, indicates that the DB instance should be
-- associated with the specified CharacterSet.
--
-- __Amazon Aurora__
--
-- Not applicable. The character set is managed by the DB cluster. For more
-- information, see @CreateDBCluster@.
createDBInstance_characterSetName :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Text)
createDBInstance_characterSetName :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_characterSetName = (CreateDBInstance -> Maybe Text)
-> (CreateDBInstance -> Maybe Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Text
characterSetName :: Maybe Text
$sel:characterSetName:CreateDBInstance' :: CreateDBInstance -> Maybe Text
characterSetName} -> Maybe Text
characterSetName) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Text
a -> CreateDBInstance
s {$sel:characterSetName:CreateDBInstance' :: Maybe Text
characterSetName = Maybe Text
a} :: CreateDBInstance)

-- | The upper limit in gibibytes (GiB) to which Amazon RDS can automatically
-- scale the storage of the DB instance.
--
-- For more information about this setting, including limitations that
-- apply to it, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIOPS.StorageTypes.html#USER_PIOPS.Autoscaling Managing capacity automatically with Amazon RDS storage autoscaling>
-- in the /Amazon RDS User Guide/.
createDBInstance_maxAllocatedStorage :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Int)
createDBInstance_maxAllocatedStorage :: (Maybe Int -> f (Maybe Int))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_maxAllocatedStorage = (CreateDBInstance -> Maybe Int)
-> (CreateDBInstance -> Maybe Int -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Int
maxAllocatedStorage :: Maybe Int
$sel:maxAllocatedStorage:CreateDBInstance' :: CreateDBInstance -> Maybe Int
maxAllocatedStorage} -> Maybe Int
maxAllocatedStorage) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Int
a -> CreateDBInstance
s {$sel:maxAllocatedStorage:CreateDBInstance' :: Maybe Int
maxAllocatedStorage = Maybe Int
a} :: CreateDBInstance)

-- | A value that indicates whether to enable Performance Insights for the DB
-- instance.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html Using Amazon Performance Insights>
-- in the /Amazon Relational Database Service User Guide/.
createDBInstance_enablePerformanceInsights :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Bool)
createDBInstance_enablePerformanceInsights :: (Maybe Bool -> f (Maybe Bool))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_enablePerformanceInsights = (CreateDBInstance -> Maybe Bool)
-> (CreateDBInstance -> Maybe Bool -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Bool
enablePerformanceInsights :: Maybe Bool
$sel:enablePerformanceInsights:CreateDBInstance' :: CreateDBInstance -> Maybe Bool
enablePerformanceInsights} -> Maybe Bool
enablePerformanceInsights) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Bool
a -> CreateDBInstance
s {$sel:enablePerformanceInsights:CreateDBInstance' :: Maybe Bool
enablePerformanceInsights = Maybe Bool
a} :: CreateDBInstance)

-- | The Amazon Web Services KMS key identifier for an encrypted DB instance.
--
-- 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.
--
-- __Amazon Aurora__
--
-- Not applicable. The Amazon Web Services KMS key identifier is managed by
-- the DB cluster. For more information, see @CreateDBCluster@.
--
-- If @StorageEncrypted@ is enabled, and you do not specify a value for the
-- @KmsKeyId@ parameter, then Amazon RDS uses 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.
createDBInstance_kmsKeyId :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Text)
createDBInstance_kmsKeyId :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_kmsKeyId = (CreateDBInstance -> Maybe Text)
-> (CreateDBInstance -> Maybe Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:CreateDBInstance' :: CreateDBInstance -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Text
a -> CreateDBInstance
s {$sel:kmsKeyId:CreateDBInstance' :: Maybe Text
kmsKeyId = Maybe Text
a} :: CreateDBInstance)

-- | The name of the DB parameter group to associate with this DB instance.
-- If you do not specify a value, then the default DB parameter group for
-- the specified DB engine and version is used.
--
-- Constraints:
--
-- -   Must be 1 to 255 letters, numbers, or hyphens.
--
-- -   First character must be a letter
--
-- -   Can\'t end with a hyphen or contain two consecutive hyphens
createDBInstance_dbParameterGroupName :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Text)
createDBInstance_dbParameterGroupName :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_dbParameterGroupName = (CreateDBInstance -> Maybe Text)
-> (CreateDBInstance -> Maybe Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Text
dbParameterGroupName :: Maybe Text
$sel:dbParameterGroupName:CreateDBInstance' :: CreateDBInstance -> Maybe Text
dbParameterGroupName} -> Maybe Text
dbParameterGroupName) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Text
a -> CreateDBInstance
s {$sel:dbParameterGroupName:CreateDBInstance' :: Maybe Text
dbParameterGroupName = Maybe Text
a} :: CreateDBInstance)

-- | 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. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow Backup window>
-- in the /Amazon RDS User Guide/.
--
-- __Amazon Aurora__
--
-- Not applicable. The daily time range for creating automated backups is
-- managed by the DB cluster.
--
-- 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.
createDBInstance_preferredBackupWindow :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Text)
createDBInstance_preferredBackupWindow :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_preferredBackupWindow = (CreateDBInstance -> Maybe Text)
-> (CreateDBInstance -> Maybe Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Text
preferredBackupWindow :: Maybe Text
$sel:preferredBackupWindow:CreateDBInstance' :: CreateDBInstance -> Maybe Text
preferredBackupWindow} -> Maybe Text
preferredBackupWindow) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Text
a -> CreateDBInstance
s {$sel:preferredBackupWindow:CreateDBInstance' :: Maybe Text
preferredBackupWindow = Maybe Text
a} :: CreateDBInstance)

-- | The Availability Zone (AZ) where the database will be created. For
-- information on Amazon Web Services Regions and Availability Zones, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html Regions and Availability Zones>.
--
-- Default: A random, system-chosen Availability Zone in the endpoint\'s
-- Amazon Web Services Region.
--
-- Example: @us-east-1d@
--
-- Constraint: The @AvailabilityZone@ parameter can\'t be specified if the
-- DB instance is a Multi-AZ deployment. The specified Availability Zone
-- must be in the same Amazon Web Services Region as the current endpoint.
--
-- If you\'re creating a DB instance in an RDS on VMware environment,
-- specify the identifier of the custom Availability Zone to create the DB
-- instance in.
--
-- For more information about RDS on VMware, see the
-- <https://docs.aws.amazon.com/AmazonRDS/latest/RDSonVMwareUserGuide/rds-on-vmware.html RDS on VMware User Guide.>
createDBInstance_availabilityZone :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Text)
createDBInstance_availabilityZone :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_availabilityZone = (CreateDBInstance -> Maybe Text)
-> (CreateDBInstance -> Maybe Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Text
availabilityZone :: Maybe Text
$sel:availabilityZone:CreateDBInstance' :: CreateDBInstance -> Maybe Text
availabilityZone} -> Maybe Text
availabilityZone) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Text
a -> CreateDBInstance
s {$sel:availabilityZone:CreateDBInstance' :: Maybe Text
availabilityZone = Maybe Text
a} :: CreateDBInstance)

-- | The number of days for which automated backups are retained. Setting
-- this parameter to a positive number enables backups. Setting this
-- parameter to 0 disables automated backups.
--
-- __Amazon Aurora__
--
-- Not applicable. The retention period for automated backups is managed by
-- the DB cluster.
--
-- Default: 1
--
-- Constraints:
--
-- -   Must be a value from 0 to 35
--
-- -   Can\'t be set to 0 if the DB instance is a source to read replicas
createDBInstance_backupRetentionPeriod :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Int)
createDBInstance_backupRetentionPeriod :: (Maybe Int -> f (Maybe Int))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_backupRetentionPeriod = (CreateDBInstance -> Maybe Int)
-> (CreateDBInstance -> Maybe Int -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Int
backupRetentionPeriod :: Maybe Int
$sel:backupRetentionPeriod:CreateDBInstance' :: CreateDBInstance -> Maybe Int
backupRetentionPeriod} -> Maybe Int
backupRetentionPeriod) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Int
a -> CreateDBInstance
s {$sel:backupRetentionPeriod:CreateDBInstance' :: Maybe Int
backupRetentionPeriod = Maybe Int
a} :: CreateDBInstance)

-- | The name of the NCHAR character set for the Oracle DB instance.
createDBInstance_ncharCharacterSetName :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Text)
createDBInstance_ncharCharacterSetName :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_ncharCharacterSetName = (CreateDBInstance -> Maybe Text)
-> (CreateDBInstance -> Maybe Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Text
ncharCharacterSetName :: Maybe Text
$sel:ncharCharacterSetName:CreateDBInstance' :: CreateDBInstance -> Maybe Text
ncharCharacterSetName} -> Maybe Text
ncharCharacterSetName) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Text
a -> CreateDBInstance
s {$sel:ncharCharacterSetName:CreateDBInstance' :: Maybe Text
ncharCharacterSetName = Maybe Text
a} :: CreateDBInstance)

-- | The Amazon Web Services KMS key identifier for encryption of Performance
-- Insights data.
--
-- 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).
--
-- If you do not specify a value for @PerformanceInsightsKMSKeyId@, then
-- Amazon RDS uses 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.
createDBInstance_performanceInsightsKMSKeyId :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Text)
createDBInstance_performanceInsightsKMSKeyId :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_performanceInsightsKMSKeyId = (CreateDBInstance -> Maybe Text)
-> (CreateDBInstance -> Maybe Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Text
performanceInsightsKMSKeyId :: Maybe Text
$sel:performanceInsightsKMSKeyId:CreateDBInstance' :: CreateDBInstance -> Maybe Text
performanceInsightsKMSKeyId} -> Maybe Text
performanceInsightsKMSKeyId) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Text
a -> CreateDBInstance
s {$sel:performanceInsightsKMSKeyId:CreateDBInstance' :: Maybe Text
performanceInsightsKMSKeyId = Maybe Text
a} :: CreateDBInstance)

-- | A list of Amazon EC2 VPC security groups to associate with this DB
-- instance.
--
-- __Amazon Aurora__
--
-- Not applicable. The associated list of EC2 VPC security groups is
-- managed by the DB cluster.
--
-- Default: The default EC2 VPC security group for the DB subnet group\'s
-- VPC.
createDBInstance_vpcSecurityGroupIds :: Lens.Lens' CreateDBInstance (Prelude.Maybe [Prelude.Text])
createDBInstance_vpcSecurityGroupIds :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_vpcSecurityGroupIds = (CreateDBInstance -> Maybe [Text])
-> (CreateDBInstance -> Maybe [Text] -> CreateDBInstance)
-> Lens
     CreateDBInstance CreateDBInstance (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe [Text]
vpcSecurityGroupIds :: Maybe [Text]
$sel:vpcSecurityGroupIds:CreateDBInstance' :: CreateDBInstance -> Maybe [Text]
vpcSecurityGroupIds} -> Maybe [Text]
vpcSecurityGroupIds) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe [Text]
a -> CreateDBInstance
s {$sel:vpcSecurityGroupIds:CreateDBInstance' :: Maybe [Text]
vpcSecurityGroupIds = Maybe [Text]
a} :: CreateDBInstance) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateDBInstance -> f CreateDBInstance)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateDBInstance
-> f CreateDBInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A value that indicates whether the DB instance is a Multi-AZ deployment.
-- You can\'t set the @AvailabilityZone@ parameter if the DB instance is a
-- Multi-AZ deployment.
createDBInstance_multiAZ :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Bool)
createDBInstance_multiAZ :: (Maybe Bool -> f (Maybe Bool))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_multiAZ = (CreateDBInstance -> Maybe Bool)
-> (CreateDBInstance -> Maybe Bool -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Bool
multiAZ :: Maybe Bool
$sel:multiAZ:CreateDBInstance' :: CreateDBInstance -> Maybe Bool
multiAZ} -> Maybe Bool
multiAZ) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Bool
a -> CreateDBInstance
s {$sel:multiAZ:CreateDBInstance' :: Maybe Bool
multiAZ = Maybe Bool
a} :: CreateDBInstance)

-- | The amount of storage in gibibytes (GiB) to allocate for the DB
-- instance.
--
-- Type: Integer
--
-- __Amazon Aurora__
--
-- Not applicable. Aurora cluster volumes automatically grow as the amount
-- of data in your database increases, though you are only charged for the
-- space that you use in an Aurora cluster volume.
--
-- __MySQL__
--
-- Constraints to the amount of storage for each storage type are the
-- following:
--
-- -   General Purpose (SSD) storage (gp2): Must be an integer from 20 to
--     65536.
--
-- -   Provisioned IOPS storage (io1): Must be an integer from 100 to
--     65536.
--
-- -   Magnetic storage (standard): Must be an integer from 5 to 3072.
--
-- __MariaDB__
--
-- Constraints to the amount of storage for each storage type are the
-- following:
--
-- -   General Purpose (SSD) storage (gp2): Must be an integer from 20 to
--     65536.
--
-- -   Provisioned IOPS storage (io1): Must be an integer from 100 to
--     65536.
--
-- -   Magnetic storage (standard): Must be an integer from 5 to 3072.
--
-- __PostgreSQL__
--
-- Constraints to the amount of storage for each storage type are the
-- following:
--
-- -   General Purpose (SSD) storage (gp2): Must be an integer from 20 to
--     65536.
--
-- -   Provisioned IOPS storage (io1): Must be an integer from 100 to
--     65536.
--
-- -   Magnetic storage (standard): Must be an integer from 5 to 3072.
--
-- __Oracle__
--
-- Constraints to the amount of storage for each storage type are the
-- following:
--
-- -   General Purpose (SSD) storage (gp2): Must be an integer from 20 to
--     65536.
--
-- -   Provisioned IOPS storage (io1): Must be an integer from 100 to
--     65536.
--
-- -   Magnetic storage (standard): Must be an integer from 10 to 3072.
--
-- __SQL Server__
--
-- Constraints to the amount of storage for each storage type are the
-- following:
--
-- -   General Purpose (SSD) storage (gp2):
--
--     -   Enterprise and Standard editions: Must be an integer from 200 to
--         16384.
--
--     -   Web and Express editions: Must be an integer from 20 to 16384.
--
-- -   Provisioned IOPS storage (io1):
--
--     -   Enterprise and Standard editions: Must be an integer from 200 to
--         16384.
--
--     -   Web and Express editions: Must be an integer from 100 to 16384.
--
-- -   Magnetic storage (standard):
--
--     -   Enterprise and Standard editions: Must be an integer from 200 to
--         1024.
--
--     -   Web and Express editions: Must be an integer from 20 to 1024.
createDBInstance_allocatedStorage :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Int)
createDBInstance_allocatedStorage :: (Maybe Int -> f (Maybe Int))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_allocatedStorage = (CreateDBInstance -> Maybe Int)
-> (CreateDBInstance -> Maybe Int -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Int
allocatedStorage :: Maybe Int
$sel:allocatedStorage:CreateDBInstance' :: CreateDBInstance -> Maybe Int
allocatedStorage} -> Maybe Int
allocatedStorage) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Int
a -> CreateDBInstance
s {$sel:allocatedStorage:CreateDBInstance' :: Maybe Int
allocatedStorage = Maybe Int
a} :: CreateDBInstance)

-- | A value that indicates that the DB instance should be associated with
-- the specified option group.
--
-- Permanent options, such as the TDE option for Oracle Advanced Security
-- TDE, can\'t be removed from an option group. Also, that option group
-- can\'t be removed from a DB instance once it is associated with a DB
-- instance
createDBInstance_optionGroupName :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Text)
createDBInstance_optionGroupName :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_optionGroupName = (CreateDBInstance -> Maybe Text)
-> (CreateDBInstance -> Maybe Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Text
optionGroupName :: Maybe Text
$sel:optionGroupName:CreateDBInstance' :: CreateDBInstance -> Maybe Text
optionGroupName} -> Maybe Text
optionGroupName) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Text
a -> CreateDBInstance
s {$sel:optionGroupName:CreateDBInstance' :: Maybe Text
optionGroupName = Maybe Text
a} :: CreateDBInstance)

-- | A value that indicates whether to copy tags from the DB instance to
-- snapshots of the DB instance. By default, tags are not copied.
--
-- __Amazon Aurora__
--
-- Not applicable. Copying tags to snapshots is managed by the DB cluster.
-- Setting this value for an Aurora DB instance has no effect on the DB
-- cluster setting.
createDBInstance_copyTagsToSnapshot :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Bool)
createDBInstance_copyTagsToSnapshot :: (Maybe Bool -> f (Maybe Bool))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_copyTagsToSnapshot = (CreateDBInstance -> Maybe Bool)
-> (CreateDBInstance -> Maybe Bool -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Bool
copyTagsToSnapshot :: Maybe Bool
$sel:copyTagsToSnapshot:CreateDBInstance' :: CreateDBInstance -> Maybe Bool
copyTagsToSnapshot} -> Maybe Bool
copyTagsToSnapshot) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Bool
a -> CreateDBInstance
s {$sel:copyTagsToSnapshot:CreateDBInstance' :: Maybe Bool
copyTagsToSnapshot = Maybe Bool
a} :: CreateDBInstance)

-- | The time zone of the DB instance. The time zone parameter is currently
-- supported only by
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html#SQLServer.Concepts.General.TimeZone Microsoft SQL Server>.
createDBInstance_timezone :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Text)
createDBInstance_timezone :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_timezone = (CreateDBInstance -> Maybe Text)
-> (CreateDBInstance -> Maybe Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Text
timezone :: Maybe Text
$sel:timezone:CreateDBInstance' :: CreateDBInstance -> Maybe Text
timezone} -> Maybe Text
timezone) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Text
a -> CreateDBInstance
s {$sel:timezone:CreateDBInstance' :: Maybe Text
timezone = Maybe Text
a} :: CreateDBInstance)

-- | The ARN from the key store with which to associate the instance for TDE
-- encryption.
createDBInstance_tdeCredentialArn :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Text)
createDBInstance_tdeCredentialArn :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_tdeCredentialArn = (CreateDBInstance -> Maybe Text)
-> (CreateDBInstance -> Maybe Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Text
tdeCredentialArn :: Maybe Text
$sel:tdeCredentialArn:CreateDBInstance' :: CreateDBInstance -> Maybe Text
tdeCredentialArn} -> Maybe Text
tdeCredentialArn) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Text
a -> CreateDBInstance
s {$sel:tdeCredentialArn:CreateDBInstance' :: Maybe Text
tdeCredentialArn = Maybe Text
a} :: CreateDBInstance)

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

-- | Tags to assign to the DB instance.
createDBInstance_tags :: Lens.Lens' CreateDBInstance (Prelude.Maybe [Tag])
createDBInstance_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_tags = (CreateDBInstance -> Maybe [Tag])
-> (CreateDBInstance -> Maybe [Tag] -> CreateDBInstance)
-> Lens
     CreateDBInstance CreateDBInstance (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateDBInstance' :: CreateDBInstance -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe [Tag]
a -> CreateDBInstance
s {$sel:tags:CreateDBInstance' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateDBInstance) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateDBInstance -> f CreateDBInstance)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDBInstance
-> f CreateDBInstance
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 database accepts connections.
--
-- __MySQL__
--
-- Default: @3306@
--
-- Valid values: @1150-65535@
--
-- Type: Integer
--
-- __MariaDB__
--
-- Default: @3306@
--
-- Valid values: @1150-65535@
--
-- Type: Integer
--
-- __PostgreSQL__
--
-- Default: @5432@
--
-- Valid values: @1150-65535@
--
-- Type: Integer
--
-- __Oracle__
--
-- Default: @1521@
--
-- Valid values: @1150-65535@
--
-- __SQL Server__
--
-- Default: @1433@
--
-- Valid values: @1150-65535@ except @1234@, @1434@, @3260@, @3343@,
-- @3389@, @47001@, and @49152-49156@.
--
-- __Amazon Aurora__
--
-- Default: @3306@
--
-- Valid values: @1150-65535@
--
-- Type: Integer
createDBInstance_port :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Int)
createDBInstance_port :: (Maybe Int -> f (Maybe Int))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_port = (CreateDBInstance -> Maybe Int)
-> (CreateDBInstance -> Maybe Int -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Int
port :: Maybe Int
$sel:port:CreateDBInstance' :: CreateDBInstance -> Maybe Int
port} -> Maybe Int
port) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Int
a -> CreateDBInstance
s {$sel:port:CreateDBInstance' :: Maybe Int
port = Maybe Int
a} :: CreateDBInstance)

-- | 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.
--
-- This setting doesn\'t apply to Amazon Aurora. Mapping Amazon Web
-- Services IAM accounts to database accounts is managed by the DB cluster.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html IAM Database Authentication for MySQL and PostgreSQL>
-- in the /Amazon RDS User Guide./
createDBInstance_enableIAMDatabaseAuthentication :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Bool)
createDBInstance_enableIAMDatabaseAuthentication :: (Maybe Bool -> f (Maybe Bool))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_enableIAMDatabaseAuthentication = (CreateDBInstance -> Maybe Bool)
-> (CreateDBInstance -> Maybe Bool -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Bool
enableIAMDatabaseAuthentication :: Maybe Bool
$sel:enableIAMDatabaseAuthentication:CreateDBInstance' :: CreateDBInstance -> Maybe Bool
enableIAMDatabaseAuthentication} -> Maybe Bool
enableIAMDatabaseAuthentication) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Bool
a -> CreateDBInstance
s {$sel:enableIAMDatabaseAuthentication:CreateDBInstance' :: Maybe Bool
enableIAMDatabaseAuthentication = Maybe Bool
a} :: CreateDBInstance)

-- | Specifies the storage type to be associated with the DB instance.
--
-- Valid values: @standard | gp2 | io1@
--
-- If you specify @io1@, you must also include a value for the @Iops@
-- parameter.
--
-- Default: @io1@ if the @Iops@ parameter is specified, otherwise @gp2@
createDBInstance_storageType :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Text)
createDBInstance_storageType :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_storageType = (CreateDBInstance -> Maybe Text)
-> (CreateDBInstance -> Maybe Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Text
storageType :: Maybe Text
$sel:storageType:CreateDBInstance' :: CreateDBInstance -> Maybe Text
storageType} -> Maybe Text
storageType) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Text
a -> CreateDBInstance
s {$sel:storageType:CreateDBInstance' :: Maybe Text
storageType = Maybe Text
a} :: CreateDBInstance)

-- | 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/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch Publishing Database Logs to Amazon CloudWatch Logs>
-- in the /Amazon Relational Database Service User Guide/.
--
-- __Amazon Aurora__
--
-- Not applicable. CloudWatch Logs exports are managed by the DB cluster.
--
-- __MariaDB__
--
-- Possible values are @audit@, @error@, @general@, and @slowquery@.
--
-- __Microsoft SQL Server__
--
-- Possible values are @agent@ and @error@.
--
-- __MySQL__
--
-- Possible values are @audit@, @error@, @general@, and @slowquery@.
--
-- __Oracle__
--
-- Possible values are @alert@, @audit@, @listener@, @trace@, and
-- @oemagent@.
--
-- __PostgreSQL__
--
-- Possible values are @postgresql@ and @upgrade@.
createDBInstance_enableCloudwatchLogsExports :: Lens.Lens' CreateDBInstance (Prelude.Maybe [Prelude.Text])
createDBInstance_enableCloudwatchLogsExports :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_enableCloudwatchLogsExports = (CreateDBInstance -> Maybe [Text])
-> (CreateDBInstance -> Maybe [Text] -> CreateDBInstance)
-> Lens
     CreateDBInstance CreateDBInstance (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe [Text]
enableCloudwatchLogsExports :: Maybe [Text]
$sel:enableCloudwatchLogsExports:CreateDBInstance' :: CreateDBInstance -> Maybe [Text]
enableCloudwatchLogsExports} -> Maybe [Text]
enableCloudwatchLogsExports) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe [Text]
a -> CreateDBInstance
s {$sel:enableCloudwatchLogsExports:CreateDBInstance' :: Maybe [Text]
enableCloudwatchLogsExports = Maybe [Text]
a} :: CreateDBInstance) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateDBInstance -> f CreateDBInstance)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateDBInstance
-> f CreateDBInstance
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 meaning of this parameter differs according to the database engine
-- you use.
--
-- __MySQL__
--
-- The name of the database to create when the DB instance is created. If
-- this parameter isn\'t specified, no database is created in the DB
-- instance.
--
-- Constraints:
--
-- -   Must contain 1 to 64 letters or numbers.
--
-- -   Must begin with a letter. Subsequent characters can be letters,
--     underscores, or digits (0-9).
--
-- -   Can\'t be a word reserved by the specified database engine
--
-- __MariaDB__
--
-- The name of the database to create when the DB instance is created. If
-- this parameter isn\'t specified, no database is created in the DB
-- instance.
--
-- Constraints:
--
-- -   Must contain 1 to 64 letters or numbers.
--
-- -   Must begin with a letter. Subsequent characters can be letters,
--     underscores, or digits (0-9).
--
-- -   Can\'t be a word reserved by the specified database engine
--
-- __PostgreSQL__
--
-- The name of the database to create when the DB instance is created. If
-- this parameter isn\'t specified, a database named @postgres@ is created
-- in the DB instance.
--
-- Constraints:
--
-- -   Must contain 1 to 63 letters, numbers, or underscores.
--
-- -   Must begin with a letter. Subsequent characters can be letters,
--     underscores, or digits (0-9).
--
-- -   Can\'t be a word reserved by the specified database engine
--
-- __Oracle__
--
-- The Oracle System ID (SID) of the created DB instance. If you specify
-- @null@, the default value @ORCL@ is used. You can\'t specify the string
-- NULL, or any other reserved word, for @DBName@.
--
-- Default: @ORCL@
--
-- Constraints:
--
-- -   Can\'t be longer than 8 characters
--
-- __SQL Server__
--
-- Not applicable. Must be null.
--
-- __Amazon Aurora MySQL__
--
-- The name of the database to create when the primary DB instance of the
-- Aurora MySQL DB cluster is created. If this parameter isn\'t specified
-- for an Aurora MySQL DB cluster, no database is created in the DB
-- cluster.
--
-- Constraints:
--
-- -   It must contain 1 to 64 alphanumeric characters.
--
-- -   It can\'t be a word reserved by the database engine.
--
-- __Amazon Aurora PostgreSQL__
--
-- The name of the database to create when the primary DB instance of the
-- Aurora PostgreSQL DB cluster is created. If this parameter isn\'t
-- specified for an Aurora PostgreSQL DB cluster, a database named
-- @postgres@ is created in the DB cluster.
--
-- Constraints:
--
-- -   It must contain 1 to 63 alphanumeric characters.
--
-- -   It must begin with a letter or an underscore. Subsequent characters
--     can be letters, underscores, or digits (0 to 9).
--
-- -   It can\'t be a word reserved by the database engine.
createDBInstance_dbName :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Text)
createDBInstance_dbName :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_dbName = (CreateDBInstance -> Maybe Text)
-> (CreateDBInstance -> Maybe Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Text
dbName :: Maybe Text
$sel:dbName:CreateDBInstance' :: CreateDBInstance -> Maybe Text
dbName} -> Maybe Text
dbName) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Text
a -> CreateDBInstance
s {$sel:dbName:CreateDBInstance' :: Maybe Text
dbName = Maybe Text
a} :: CreateDBInstance)

-- | The DB instance 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: @mydbinstance@
createDBInstance_dbInstanceIdentifier :: Lens.Lens' CreateDBInstance Prelude.Text
createDBInstance_dbInstanceIdentifier :: (Text -> f Text) -> CreateDBInstance -> f CreateDBInstance
createDBInstance_dbInstanceIdentifier = (CreateDBInstance -> Text)
-> (CreateDBInstance -> Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Text
dbInstanceIdentifier :: Text
$sel:dbInstanceIdentifier:CreateDBInstance' :: CreateDBInstance -> Text
dbInstanceIdentifier} -> Text
dbInstanceIdentifier) (\s :: CreateDBInstance
s@CreateDBInstance' {} Text
a -> CreateDBInstance
s {$sel:dbInstanceIdentifier:CreateDBInstance' :: Text
dbInstanceIdentifier = Text
a} :: CreateDBInstance)

-- | The compute and memory capacity of the DB instance, for example,
-- @db.m4.large@. Not all DB instance classes are available in all Amazon
-- Web Services Regions, or for all database engines. For the full list of
-- DB instance classes, and availability for your engine, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html DB Instance Class>
-- in the /Amazon RDS User Guide./
createDBInstance_dbInstanceClass :: Lens.Lens' CreateDBInstance Prelude.Text
createDBInstance_dbInstanceClass :: (Text -> f Text) -> CreateDBInstance -> f CreateDBInstance
createDBInstance_dbInstanceClass = (CreateDBInstance -> Text)
-> (CreateDBInstance -> Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Text
dbInstanceClass :: Text
$sel:dbInstanceClass:CreateDBInstance' :: CreateDBInstance -> Text
dbInstanceClass} -> Text
dbInstanceClass) (\s :: CreateDBInstance
s@CreateDBInstance' {} Text
a -> CreateDBInstance
s {$sel:dbInstanceClass:CreateDBInstance' :: Text
dbInstanceClass = Text
a} :: CreateDBInstance)

-- | The name of the database engine to be used for this instance.
--
-- Not every database engine is available for every Amazon Web Services
-- Region.
--
-- Valid Values:
--
-- -   @aurora@ (for MySQL 5.6-compatible Aurora)
--
-- -   @aurora-mysql@ (for MySQL 5.7-compatible Aurora)
--
-- -   @aurora-postgresql@
--
-- -   @mariadb@
--
-- -   @mysql@
--
-- -   @oracle-ee@
--
-- -   @oracle-ee-cdb@
--
-- -   @oracle-se2@
--
-- -   @oracle-se2-cdb@
--
-- -   @postgres@
--
-- -   @sqlserver-ee@
--
-- -   @sqlserver-se@
--
-- -   @sqlserver-ex@
--
-- -   @sqlserver-web@
createDBInstance_engine :: Lens.Lens' CreateDBInstance Prelude.Text
createDBInstance_engine :: (Text -> f Text) -> CreateDBInstance -> f CreateDBInstance
createDBInstance_engine = (CreateDBInstance -> Text)
-> (CreateDBInstance -> Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Text
engine :: Text
$sel:engine:CreateDBInstance' :: CreateDBInstance -> Text
engine} -> Text
engine) (\s :: CreateDBInstance
s@CreateDBInstance' {} Text
a -> CreateDBInstance
s {$sel:engine:CreateDBInstance' :: Text
engine = Text
a} :: CreateDBInstance)

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

instance Prelude.NFData CreateDBInstance

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

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

instance Core.ToQuery CreateDBInstance where
  toQuery :: CreateDBInstance -> QueryString
toQuery CreateDBInstance' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [ProcessorFeature]
Maybe [Tag]
Maybe Text
Text
engine :: Text
dbInstanceClass :: Text
dbInstanceIdentifier :: Text
dbName :: Maybe Text
enableCloudwatchLogsExports :: Maybe [Text]
storageType :: Maybe Text
enableIAMDatabaseAuthentication :: Maybe Bool
port :: Maybe Int
tags :: Maybe [Tag]
domainIAMRoleName :: Maybe Text
tdeCredentialArn :: Maybe Text
timezone :: Maybe Text
copyTagsToSnapshot :: Maybe Bool
optionGroupName :: Maybe Text
allocatedStorage :: Maybe Int
multiAZ :: Maybe Bool
vpcSecurityGroupIds :: Maybe [Text]
performanceInsightsKMSKeyId :: Maybe Text
ncharCharacterSetName :: Maybe Text
backupRetentionPeriod :: Maybe Int
availabilityZone :: Maybe Text
preferredBackupWindow :: Maybe Text
dbParameterGroupName :: Maybe Text
kmsKeyId :: Maybe Text
enablePerformanceInsights :: Maybe Bool
maxAllocatedStorage :: Maybe Int
characterSetName :: Maybe Text
performanceInsightsRetentionPeriod :: Maybe Int
preferredMaintenanceWindow :: Maybe Text
licenseModel :: Maybe Text
promotionTier :: Maybe Int
processorFeatures :: Maybe [ProcessorFeature]
tdeCredentialPassword :: Maybe Text
monitoringInterval :: Maybe Int
enableCustomerOwnedIp :: Maybe Bool
domain :: Maybe Text
iops :: Maybe Int
monitoringRoleArn :: Maybe Text
dbSubnetGroupName :: Maybe Text
masterUsername :: Maybe Text
autoMinorVersionUpgrade :: Maybe Bool
publiclyAccessible :: Maybe Bool
masterUserPassword :: Maybe Text
dbClusterIdentifier :: Maybe Text
storageEncrypted :: Maybe Bool
deletionProtection :: Maybe Bool
dbSecurityGroups :: Maybe [Text]
engineVersion :: Maybe Text
$sel:engine:CreateDBInstance' :: CreateDBInstance -> Text
$sel:dbInstanceClass:CreateDBInstance' :: CreateDBInstance -> Text
$sel:dbInstanceIdentifier:CreateDBInstance' :: CreateDBInstance -> Text
$sel:dbName:CreateDBInstance' :: CreateDBInstance -> Maybe Text
$sel:enableCloudwatchLogsExports:CreateDBInstance' :: CreateDBInstance -> Maybe [Text]
$sel:storageType:CreateDBInstance' :: CreateDBInstance -> Maybe Text
$sel:enableIAMDatabaseAuthentication:CreateDBInstance' :: CreateDBInstance -> Maybe Bool
$sel:port:CreateDBInstance' :: CreateDBInstance -> Maybe Int
$sel:tags:CreateDBInstance' :: CreateDBInstance -> Maybe [Tag]
$sel:domainIAMRoleName:CreateDBInstance' :: CreateDBInstance -> Maybe Text
$sel:tdeCredentialArn:CreateDBInstance' :: CreateDBInstance -> Maybe Text
$sel:timezone:CreateDBInstance' :: CreateDBInstance -> Maybe Text
$sel:copyTagsToSnapshot:CreateDBInstance' :: CreateDBInstance -> Maybe Bool
$sel:optionGroupName:CreateDBInstance' :: CreateDBInstance -> Maybe Text
$sel:allocatedStorage:CreateDBInstance' :: CreateDBInstance -> Maybe Int
$sel:multiAZ:CreateDBInstance' :: CreateDBInstance -> Maybe Bool
$sel:vpcSecurityGroupIds:CreateDBInstance' :: CreateDBInstance -> Maybe [Text]
$sel:performanceInsightsKMSKeyId:CreateDBInstance' :: CreateDBInstance -> Maybe Text
$sel:ncharCharacterSetName:CreateDBInstance' :: CreateDBInstance -> Maybe Text
$sel:backupRetentionPeriod:CreateDBInstance' :: CreateDBInstance -> Maybe Int
$sel:availabilityZone:CreateDBInstance' :: CreateDBInstance -> Maybe Text
$sel:preferredBackupWindow:CreateDBInstance' :: CreateDBInstance -> Maybe Text
$sel:dbParameterGroupName:CreateDBInstance' :: CreateDBInstance -> Maybe Text
$sel:kmsKeyId:CreateDBInstance' :: CreateDBInstance -> Maybe Text
$sel:enablePerformanceInsights:CreateDBInstance' :: CreateDBInstance -> Maybe Bool
$sel:maxAllocatedStorage:CreateDBInstance' :: CreateDBInstance -> Maybe Int
$sel:characterSetName:CreateDBInstance' :: CreateDBInstance -> Maybe Text
$sel:performanceInsightsRetentionPeriod:CreateDBInstance' :: CreateDBInstance -> Maybe Int
$sel:preferredMaintenanceWindow:CreateDBInstance' :: CreateDBInstance -> Maybe Text
$sel:licenseModel:CreateDBInstance' :: CreateDBInstance -> Maybe Text
$sel:promotionTier:CreateDBInstance' :: CreateDBInstance -> Maybe Int
$sel:processorFeatures:CreateDBInstance' :: CreateDBInstance -> Maybe [ProcessorFeature]
$sel:tdeCredentialPassword:CreateDBInstance' :: CreateDBInstance -> Maybe Text
$sel:monitoringInterval:CreateDBInstance' :: CreateDBInstance -> Maybe Int
$sel:enableCustomerOwnedIp:CreateDBInstance' :: CreateDBInstance -> Maybe Bool
$sel:domain:CreateDBInstance' :: CreateDBInstance -> Maybe Text
$sel:iops:CreateDBInstance' :: CreateDBInstance -> Maybe Int
$sel:monitoringRoleArn:CreateDBInstance' :: CreateDBInstance -> Maybe Text
$sel:dbSubnetGroupName:CreateDBInstance' :: CreateDBInstance -> Maybe Text
$sel:masterUsername:CreateDBInstance' :: CreateDBInstance -> Maybe Text
$sel:autoMinorVersionUpgrade:CreateDBInstance' :: CreateDBInstance -> Maybe Bool
$sel:publiclyAccessible:CreateDBInstance' :: CreateDBInstance -> Maybe Bool
$sel:masterUserPassword:CreateDBInstance' :: CreateDBInstance -> Maybe Text
$sel:dbClusterIdentifier:CreateDBInstance' :: CreateDBInstance -> Maybe Text
$sel:storageEncrypted:CreateDBInstance' :: CreateDBInstance -> Maybe Bool
$sel:deletionProtection:CreateDBInstance' :: CreateDBInstance -> Maybe Bool
$sel:dbSecurityGroups:CreateDBInstance' :: CreateDBInstance -> Maybe [Text]
$sel:engineVersion:CreateDBInstance' :: CreateDBInstance -> 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
"CreateDBInstance" :: 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
"DBSecurityGroups"
          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
"DBSecurityGroupName"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
dbSecurityGroups
            ),
        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
"DBClusterIdentifier" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
dbClusterIdentifier,
        ByteString
"MasterUserPassword" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
masterUserPassword,
        ByteString
"PubliclyAccessible" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
publiclyAccessible,
        ByteString
"AutoMinorVersionUpgrade"
          ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
autoMinorVersionUpgrade,
        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
"MonitoringRoleArn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
monitoringRoleArn,
        ByteString
"Iops" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
iops,
        ByteString
"Domain" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
domain,
        ByteString
"EnableCustomerOwnedIp"
          ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
enableCustomerOwnedIp,
        ByteString
"MonitoringInterval" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
monitoringInterval,
        ByteString
"TdeCredentialPassword"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
tdeCredentialPassword,
        ByteString
"ProcessorFeatures"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [ProcessorFeature] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"ProcessorFeature"
                ([ProcessorFeature] -> QueryString)
-> Maybe [ProcessorFeature] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ProcessorFeature]
processorFeatures
            ),
        ByteString
"PromotionTier" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
promotionTier,
        ByteString
"LicenseModel" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
licenseModel,
        ByteString
"PreferredMaintenanceWindow"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
preferredMaintenanceWindow,
        ByteString
"PerformanceInsightsRetentionPeriod"
          ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
performanceInsightsRetentionPeriod,
        ByteString
"CharacterSetName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
characterSetName,
        ByteString
"MaxAllocatedStorage" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxAllocatedStorage,
        ByteString
"EnablePerformanceInsights"
          ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
enablePerformanceInsights,
        ByteString
"KmsKeyId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
kmsKeyId,
        ByteString
"DBParameterGroupName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
dbParameterGroupName,
        ByteString
"PreferredBackupWindow"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
preferredBackupWindow,
        ByteString
"AvailabilityZone" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
availabilityZone,
        ByteString
"BackupRetentionPeriod"
          ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
backupRetentionPeriod,
        ByteString
"NcharCharacterSetName"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
ncharCharacterSetName,
        ByteString
"PerformanceInsightsKMSKeyId"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
performanceInsightsKMSKeyId,
        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
"MultiAZ" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
multiAZ,
        ByteString
"AllocatedStorage" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
allocatedStorage,
        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
"Timezone" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
timezone,
        ByteString
"TdeCredentialArn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
tdeCredentialArn,
        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
"StorageType" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
storageType,
        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
"DBName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
dbName,
        ByteString
"DBInstanceIdentifier" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbInstanceIdentifier,
        ByteString
"DBInstanceClass" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbInstanceClass,
        ByteString
"Engine" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
engine
      ]

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

-- |
-- Create a value of 'CreateDBInstanceResponse' 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:
--
-- 'dbInstance', 'createDBInstanceResponse_dbInstance' - Undocumented member.
--
-- 'httpStatus', 'createDBInstanceResponse_httpStatus' - The response's http status code.
newCreateDBInstanceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateDBInstanceResponse
newCreateDBInstanceResponse :: Int -> CreateDBInstanceResponse
newCreateDBInstanceResponse Int
pHttpStatus_ =
  CreateDBInstanceResponse' :: Maybe DBInstance -> Int -> CreateDBInstanceResponse
CreateDBInstanceResponse'
    { $sel:dbInstance:CreateDBInstanceResponse' :: Maybe DBInstance
dbInstance =
        Maybe DBInstance
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateDBInstanceResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
createDBInstanceResponse_dbInstance :: Lens.Lens' CreateDBInstanceResponse (Prelude.Maybe DBInstance)
createDBInstanceResponse_dbInstance :: (Maybe DBInstance -> f (Maybe DBInstance))
-> CreateDBInstanceResponse -> f CreateDBInstanceResponse
createDBInstanceResponse_dbInstance = (CreateDBInstanceResponse -> Maybe DBInstance)
-> (CreateDBInstanceResponse
    -> Maybe DBInstance -> CreateDBInstanceResponse)
-> Lens
     CreateDBInstanceResponse
     CreateDBInstanceResponse
     (Maybe DBInstance)
     (Maybe DBInstance)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceResponse' {Maybe DBInstance
dbInstance :: Maybe DBInstance
$sel:dbInstance:CreateDBInstanceResponse' :: CreateDBInstanceResponse -> Maybe DBInstance
dbInstance} -> Maybe DBInstance
dbInstance) (\s :: CreateDBInstanceResponse
s@CreateDBInstanceResponse' {} Maybe DBInstance
a -> CreateDBInstanceResponse
s {$sel:dbInstance:CreateDBInstanceResponse' :: Maybe DBInstance
dbInstance = Maybe DBInstance
a} :: CreateDBInstanceResponse)

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

instance Prelude.NFData CreateDBInstanceResponse