{-# 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.CreateDBInstanceReadReplica
-- 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 that acts as a read replica for an existing
-- source DB instance. You can create a read replica for a DB instance
-- running MySQL, MariaDB, Oracle, PostgreSQL, or SQL Server. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html Working with Read Replicas>
-- in the /Amazon RDS User Guide/.
--
-- Amazon Aurora doesn\'t support this action. Call the @CreateDBInstance@
-- action to create a DB instance for an Aurora DB cluster.
--
-- All read replica DB instances are created with backups disabled. All
-- other DB instance attributes (including DB security groups and DB
-- parameter groups) are inherited from the source DB instance, except as
-- specified.
--
-- Your source DB instance must have backup retention enabled.
module Amazonka.RDS.CreateDBInstanceReadReplica
  ( -- * Creating a Request
    CreateDBInstanceReadReplica (..),
    newCreateDBInstanceReadReplica,

    -- * Request Lenses
    createDBInstanceReadReplica_deletionProtection,
    createDBInstanceReadReplica_publiclyAccessible,
    createDBInstanceReadReplica_autoMinorVersionUpgrade,
    createDBInstanceReadReplica_dbSubnetGroupName,
    createDBInstanceReadReplica_monitoringRoleArn,
    createDBInstanceReadReplica_iops,
    createDBInstanceReadReplica_domain,
    createDBInstanceReadReplica_replicaMode,
    createDBInstanceReadReplica_monitoringInterval,
    createDBInstanceReadReplica_preSignedUrl,
    createDBInstanceReadReplica_processorFeatures,
    createDBInstanceReadReplica_dbInstanceClass,
    createDBInstanceReadReplica_performanceInsightsRetentionPeriod,
    createDBInstanceReadReplica_destinationRegion,
    createDBInstanceReadReplica_maxAllocatedStorage,
    createDBInstanceReadReplica_enablePerformanceInsights,
    createDBInstanceReadReplica_kmsKeyId,
    createDBInstanceReadReplica_dbParameterGroupName,
    createDBInstanceReadReplica_availabilityZone,
    createDBInstanceReadReplica_performanceInsightsKMSKeyId,
    createDBInstanceReadReplica_vpcSecurityGroupIds,
    createDBInstanceReadReplica_multiAZ,
    createDBInstanceReadReplica_optionGroupName,
    createDBInstanceReadReplica_copyTagsToSnapshot,
    createDBInstanceReadReplica_domainIAMRoleName,
    createDBInstanceReadReplica_tags,
    createDBInstanceReadReplica_port,
    createDBInstanceReadReplica_enableIAMDatabaseAuthentication,
    createDBInstanceReadReplica_useDefaultProcessorFeatures,
    createDBInstanceReadReplica_storageType,
    createDBInstanceReadReplica_enableCloudwatchLogsExports,
    createDBInstanceReadReplica_dbInstanceIdentifier,
    createDBInstanceReadReplica_sourceDBInstanceIdentifier,

    -- * Destructuring the Response
    CreateDBInstanceReadReplicaResponse (..),
    newCreateDBInstanceReadReplicaResponse,

    -- * Response Lenses
    createDBInstanceReadReplicaResponse_dbInstance,
    createDBInstanceReadReplicaResponse_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:/ 'newCreateDBInstanceReadReplica' smart constructor.
data CreateDBInstanceReadReplica = CreateDBInstanceReadReplica'
  { -- | 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>.
    CreateDBInstanceReadReplica -> Maybe Bool
deletionProtection :: Prelude.Maybe Prelude.Bool,
    -- | 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.
    --
    -- For more information, see CreateDBInstance.
    CreateDBInstanceReadReplica -> Maybe Bool
publiclyAccessible :: Prelude.Maybe Prelude.Bool,
    -- | A value that indicates whether minor engine upgrades are applied
    -- automatically to the read replica during the maintenance window.
    --
    -- Default: Inherits from the source DB instance
    CreateDBInstanceReadReplica -> Maybe Bool
autoMinorVersionUpgrade :: Prelude.Maybe Prelude.Bool,
    -- | Specifies a DB subnet group for the DB instance. The new DB instance is
    -- created in the VPC associated with the DB subnet group. If no DB subnet
    -- group is specified, then the new DB instance isn\'t created in a VPC.
    --
    -- Constraints:
    --
    -- -   Can only be specified if the source DB instance identifier specifies
    --     a DB instance in another Amazon Web Services Region.
    --
    -- -   If supplied, must match the name of an existing DBSubnetGroup.
    --
    -- -   The specified DB subnet group must be in the same Amazon Web
    --     Services Region in which the operation is running.
    --
    -- -   All read replicas in one Amazon Web Services Region that are created
    --     from the same source DB instance must either:>
    --
    --     -   Specify DB subnet groups from the same VPC. All these read
    --         replicas are created in the same VPC.
    --
    --     -   Not specify a DB subnet group. All these read replicas are
    --         created outside of any VPC.
    --
    -- Example: @mySubnetgroup@
    CreateDBInstanceReadReplica -> 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.html#USER_Monitoring.OS.IAMRole To create an IAM role for Amazon RDS 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.
    CreateDBInstanceReadReplica -> 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.
    CreateDBInstanceReadReplica -> 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/.
    CreateDBInstanceReadReplica -> Maybe Text
domain :: Prelude.Maybe Prelude.Text,
    -- | The open mode of the replica database: mounted or read-only.
    --
    -- This parameter is only supported for Oracle DB instances.
    --
    -- Mounted DB replicas are included in Oracle Enterprise Edition. The main
    -- use case for mounted replicas is cross-Region disaster recovery. The
    -- primary database doesn\'t use Active Data Guard to transmit information
    -- to the mounted replica. Because it doesn\'t accept user connections, a
    -- mounted replica can\'t serve a read-only workload.
    --
    -- You can create a combination of mounted and read-only DB replicas for
    -- the same primary DB instance. For more information, see
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-read-replicas.html Working with Oracle Read Replicas for Amazon RDS>
    -- in the /Amazon RDS User Guide/.
    CreateDBInstanceReadReplica -> Maybe ReplicaMode
replicaMode :: Prelude.Maybe ReplicaMode,
    -- | The interval, in seconds, between points when Enhanced Monitoring
    -- metrics are collected for the read replica. 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@
    CreateDBInstanceReadReplica -> Maybe Int
monitoringInterval :: Prelude.Maybe Prelude.Int,
    -- | The URL that contains a Signature Version 4 signed request for the
    -- @CreateDBInstanceReadReplica@ API action in the source Amazon Web
    -- Services Region that contains the source DB instance.
    --
    -- You must specify this parameter when you create an encrypted read
    -- replica from another Amazon Web Services Region by using the Amazon RDS
    -- API. Don\'t specify @PreSignedUrl@ when you are creating an encrypted
    -- read replica in the same Amazon Web Services Region.
    --
    -- The presigned URL must be a valid request for the
    -- @CreateDBInstanceReadReplica@ API action that can be executed in the
    -- source Amazon Web Services Region that contains the encrypted source DB
    -- instance. The presigned URL request must contain the following parameter
    -- values:
    --
    -- -   @DestinationRegion@ - The Amazon Web Services Region that the
    --     encrypted read replica is created in. This Amazon Web Services
    --     Region is the same one where the @CreateDBInstanceReadReplica@
    --     action is called that contains this presigned URL.
    --
    --     For example, if you create an encrypted DB instance in the us-west-1
    --     Amazon Web Services Region, from a source DB instance in the
    --     us-east-2 Amazon Web Services Region, then you call the
    --     @CreateDBInstanceReadReplica@ action in the us-east-1 Amazon Web
    --     Services Region and provide a presigned URL that contains a call to
    --     the @CreateDBInstanceReadReplica@ action in the us-west-2 Amazon Web
    --     Services Region. For this example, the @DestinationRegion@ in the
    --     presigned URL must be set to the us-east-1 Amazon Web Services
    --     Region.
    --
    -- -   @KmsKeyId@ - The Amazon Web Services KMS key identifier for the key
    --     to use to encrypt the read replica in the destination Amazon Web
    --     Services Region. This is the same identifier for both the
    --     @CreateDBInstanceReadReplica@ action that is called in the
    --     destination Amazon Web Services Region, and the action contained in
    --     the presigned URL.
    --
    -- -   @SourceDBInstanceIdentifier@ - The DB instance identifier for the
    --     encrypted DB instance to be replicated. This identifier must be in
    --     the Amazon Resource Name (ARN) format for the source Amazon Web
    --     Services Region. For example, if you are creating an encrypted read
    --     replica from a DB instance in the us-west-2 Amazon Web Services
    --     Region, then your @SourceDBInstanceIdentifier@ looks like the
    --     following example:
    --     @arn:aws:rds:us-west-2:123456789012:instance:mysql-instance1-20161115@.
    --
    -- To learn how to generate a Signature Version 4 signed request, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4)>
    -- and
    -- <https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html Signature Version 4 Signing Process>.
    --
    -- If you are using an Amazon Web Services SDK tool or the CLI, you can
    -- specify @SourceRegion@ (or @--source-region@ for the CLI) instead of
    -- specifying @PreSignedUrl@ manually. Specifying @SourceRegion@
    -- autogenerates a presigned URL that is a valid request for the operation
    -- that can be executed in the source Amazon Web Services Region.
    --
    -- @SourceRegion@ isn\'t supported for SQL Server, because SQL Server on
    -- Amazon RDS doesn\'t support cross-region read replicas.
    CreateDBInstanceReadReplica -> Maybe Text
preSignedUrl :: 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.
    CreateDBInstanceReadReplica -> Maybe [ProcessorFeature]
processorFeatures :: Prelude.Maybe [ProcessorFeature],
    -- | The compute and memory capacity of the read replica, 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./
    --
    -- Default: Inherits from the source DB instance.
    CreateDBInstanceReadReplica -> Maybe Text
dbInstanceClass :: Prelude.Maybe Prelude.Text,
    -- | The amount of time, in days, to retain Performance Insights data. Valid
    -- values are 7 or 731 (2 years).
    CreateDBInstanceReadReplica -> Maybe Int
performanceInsightsRetentionPeriod :: Prelude.Maybe Prelude.Int,
    -- | Pseudo-parameter used when populating the @PreSignedUrl@ of a
    -- cross-region @CreateDBInstanceReadReplica@ request. To replicate from
    -- region @SRC@ to region @DST@, send a request to region @DST@. In that
    -- request, pass a @PreSignedUrl@ for region @SRC@ with @DestinationRegion@
    -- set to region @DST@.
    CreateDBInstanceReadReplica -> Maybe Text
destinationRegion :: 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/.
    CreateDBInstanceReadReplica -> Maybe Int
maxAllocatedStorage :: Prelude.Maybe Prelude.Int,
    -- | A value that indicates whether to enable Performance Insights for the
    -- read replica.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html Using Amazon Performance Insights>
    -- in the /Amazon RDS User Guide/.
    CreateDBInstanceReadReplica -> Maybe Bool
enablePerformanceInsights :: Prelude.Maybe Prelude.Bool,
    -- | The Amazon Web Services KMS key identifier for an encrypted read
    -- replica.
    --
    -- The Amazon Web Services KMS key identifier is the key ARN, key ID, alias
    -- ARN, or alias name for the Amazon Web Services KMS CMK.
    --
    -- If you create an encrypted read replica in the same Amazon Web Services
    -- Region as the source DB instance, then do not specify a value for this
    -- parameter. A read replica in the same Region is always encrypted with
    -- the same Amazon Web Services KMS CMK as the source DB instance.
    --
    -- If you create an encrypted read replica in a different Amazon Web
    -- Services Region, then you must specify a Amazon Web Services KMS key
    -- identifier for the destination Amazon Web Services Region. Amazon Web
    -- Services KMS CMKs are specific to the Amazon Web Services Region that
    -- they are created in, and you can\'t use CMKs from one Amazon Web
    -- Services Region in another Amazon Web Services Region.
    --
    -- You can\'t create an encrypted read replica from an unencrypted DB
    -- instance.
    CreateDBInstanceReadReplica -> 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 for @DBParameterGroupName@, then Amazon
    -- RDS uses the @DBParameterGroup@ of source DB instance for a same region
    -- read replica, or the default @DBParameterGroup@ for the specified DB
    -- engine for a cross region read replica.
    --
    -- Currently, specifying a parameter group for this operation is only
    -- supported for Oracle DB instances.
    --
    -- 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
    CreateDBInstanceReadReplica -> Maybe Text
dbParameterGroupName :: Prelude.Maybe Prelude.Text,
    -- | The Availability Zone (AZ) where the read replica will be created.
    --
    -- Default: A random, system-chosen Availability Zone in the endpoint\'s
    -- Amazon Web Services Region.
    --
    -- Example: @us-east-1d@
    CreateDBInstanceReadReplica -> Maybe Text
availabilityZone :: 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.
    CreateDBInstanceReadReplica -> Maybe Text
performanceInsightsKMSKeyId :: Prelude.Maybe Prelude.Text,
    -- | A list of EC2 VPC security groups to associate with the read replica.
    --
    -- Default: The default EC2 VPC security group for the DB subnet group\'s
    -- VPC.
    CreateDBInstanceReadReplica -> Maybe [Text]
vpcSecurityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | A value that indicates whether the read replica is in a Multi-AZ
    -- deployment.
    --
    -- You can create a read replica as a Multi-AZ DB instance. RDS creates a
    -- standby of your replica in another Availability Zone for failover
    -- support for the replica. Creating your read replica as a Multi-AZ DB
    -- instance is independent of whether the source database is a Multi-AZ DB
    -- instance.
    CreateDBInstanceReadReplica -> Maybe Bool
multiAZ :: Prelude.Maybe Prelude.Bool,
    -- | The option group the DB instance is associated with. If omitted, the
    -- option group associated with the source instance is used.
    --
    -- For SQL Server, you must use the option group associated with the source
    -- instance.
    CreateDBInstanceReadReplica -> Maybe Text
optionGroupName :: Prelude.Maybe Prelude.Text,
    -- | A value that indicates whether to copy all tags from the read replica to
    -- snapshots of the read replica. By default, tags are not copied.
    CreateDBInstanceReadReplica -> Maybe Bool
copyTagsToSnapshot :: Prelude.Maybe Prelude.Bool,
    -- | Specify the name of the IAM role to be used when making API calls to the
    -- Directory Service.
    CreateDBInstanceReadReplica -> Maybe Text
domainIAMRoleName :: Prelude.Maybe Prelude.Text,
    CreateDBInstanceReadReplica -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The port number that the DB instance uses for connections.
    --
    -- Default: Inherits from the source DB instance
    --
    -- Valid Values: @1150-65535@
    CreateDBInstanceReadReplica -> Maybe Int
port :: Prelude.Maybe Prelude.Int,
    -- | A value that indicates whether to enable mapping of Amazon Web Services
    -- Identity and Access Management (IAM) accounts to database accounts. By
    -- default, mapping is disabled.
    --
    -- For more information about IAM database authentication, 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./
    CreateDBInstanceReadReplica -> Maybe Bool
enableIAMDatabaseAuthentication :: Prelude.Maybe Prelude.Bool,
    -- | A value that indicates whether the DB instance class of the DB instance
    -- uses its default processor features.
    CreateDBInstanceReadReplica -> Maybe Bool
useDefaultProcessorFeatures :: Prelude.Maybe Prelude.Bool,
    -- | Specifies the storage type to be associated with the read replica.
    --
    -- 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@
    CreateDBInstanceReadReplica -> Maybe Text
storageType :: Prelude.Maybe Prelude.Text,
    -- | The list of logs that the new DB instance is to export 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 RDS User Guide/.
    CreateDBInstanceReadReplica -> Maybe [Text]
enableCloudwatchLogsExports :: Prelude.Maybe [Prelude.Text],
    -- | The DB instance identifier of the read replica. This identifier is the
    -- unique key that identifies a DB instance. This parameter is stored as a
    -- lowercase string.
    CreateDBInstanceReadReplica -> Text
dbInstanceIdentifier :: Prelude.Text,
    -- | The identifier of the DB instance that will act as the source for the
    -- read replica. Each DB instance can have up to five read replicas.
    --
    -- Constraints:
    --
    -- -   Must be the identifier of an existing MySQL, MariaDB, Oracle,
    --     PostgreSQL, or SQL Server DB instance.
    --
    -- -   Can specify a DB instance that is a MySQL read replica only if the
    --     source is running MySQL 5.6 or later.
    --
    -- -   For the limitations of Oracle read replicas, see
    --     <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-read-replicas.html Read Replica Limitations with Oracle>
    --     in the /Amazon RDS User Guide/.
    --
    -- -   For the limitations of SQL Server read replicas, see
    --     <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/SQLServer.ReadReplicas.Limitations.html Read Replica Limitations with Microsoft SQL Server>
    --     in the /Amazon RDS User Guide/.
    --
    -- -   Can specify a PostgreSQL DB instance only if the source is running
    --     PostgreSQL 9.3.5 or later (9.4.7 and higher for cross-region
    --     replication).
    --
    -- -   The specified DB instance must have automatic backups enabled, that
    --     is, its backup retention period must be greater than 0.
    --
    -- -   If the source DB instance is in the same Amazon Web Services Region
    --     as the read replica, specify a valid DB instance identifier.
    --
    -- -   If the source DB instance is in a different Amazon Web Services
    --     Region from the read replica, specify a valid DB instance ARN. For
    --     more information, see
    --     <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing Constructing an ARN for Amazon RDS>
    --     in the /Amazon RDS User Guide/. This doesn\'t apply to SQL Server,
    --     which doesn\'t support cross-region replicas.
    CreateDBInstanceReadReplica -> Text
sourceDBInstanceIdentifier :: Prelude.Text
  }
  deriving (CreateDBInstanceReadReplica -> CreateDBInstanceReadReplica -> Bool
(CreateDBInstanceReadReplica
 -> CreateDBInstanceReadReplica -> Bool)
-> (CreateDBInstanceReadReplica
    -> CreateDBInstanceReadReplica -> Bool)
-> Eq CreateDBInstanceReadReplica
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDBInstanceReadReplica -> CreateDBInstanceReadReplica -> Bool
$c/= :: CreateDBInstanceReadReplica -> CreateDBInstanceReadReplica -> Bool
== :: CreateDBInstanceReadReplica -> CreateDBInstanceReadReplica -> Bool
$c== :: CreateDBInstanceReadReplica -> CreateDBInstanceReadReplica -> Bool
Prelude.Eq, ReadPrec [CreateDBInstanceReadReplica]
ReadPrec CreateDBInstanceReadReplica
Int -> ReadS CreateDBInstanceReadReplica
ReadS [CreateDBInstanceReadReplica]
(Int -> ReadS CreateDBInstanceReadReplica)
-> ReadS [CreateDBInstanceReadReplica]
-> ReadPrec CreateDBInstanceReadReplica
-> ReadPrec [CreateDBInstanceReadReplica]
-> Read CreateDBInstanceReadReplica
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDBInstanceReadReplica]
$creadListPrec :: ReadPrec [CreateDBInstanceReadReplica]
readPrec :: ReadPrec CreateDBInstanceReadReplica
$creadPrec :: ReadPrec CreateDBInstanceReadReplica
readList :: ReadS [CreateDBInstanceReadReplica]
$creadList :: ReadS [CreateDBInstanceReadReplica]
readsPrec :: Int -> ReadS CreateDBInstanceReadReplica
$creadsPrec :: Int -> ReadS CreateDBInstanceReadReplica
Prelude.Read, Int -> CreateDBInstanceReadReplica -> ShowS
[CreateDBInstanceReadReplica] -> ShowS
CreateDBInstanceReadReplica -> String
(Int -> CreateDBInstanceReadReplica -> ShowS)
-> (CreateDBInstanceReadReplica -> String)
-> ([CreateDBInstanceReadReplica] -> ShowS)
-> Show CreateDBInstanceReadReplica
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDBInstanceReadReplica] -> ShowS
$cshowList :: [CreateDBInstanceReadReplica] -> ShowS
show :: CreateDBInstanceReadReplica -> String
$cshow :: CreateDBInstanceReadReplica -> String
showsPrec :: Int -> CreateDBInstanceReadReplica -> ShowS
$cshowsPrec :: Int -> CreateDBInstanceReadReplica -> ShowS
Prelude.Show, (forall x.
 CreateDBInstanceReadReplica -> Rep CreateDBInstanceReadReplica x)
-> (forall x.
    Rep CreateDBInstanceReadReplica x -> CreateDBInstanceReadReplica)
-> Generic CreateDBInstanceReadReplica
forall x.
Rep CreateDBInstanceReadReplica x -> CreateDBInstanceReadReplica
forall x.
CreateDBInstanceReadReplica -> Rep CreateDBInstanceReadReplica x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateDBInstanceReadReplica x -> CreateDBInstanceReadReplica
$cfrom :: forall x.
CreateDBInstanceReadReplica -> Rep CreateDBInstanceReadReplica x
Prelude.Generic)

-- |
-- Create a value of 'CreateDBInstanceReadReplica' 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:
--
-- 'deletionProtection', 'createDBInstanceReadReplica_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>.
--
-- 'publiclyAccessible', 'createDBInstanceReadReplica_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.
--
-- For more information, see CreateDBInstance.
--
-- 'autoMinorVersionUpgrade', 'createDBInstanceReadReplica_autoMinorVersionUpgrade' - A value that indicates whether minor engine upgrades are applied
-- automatically to the read replica during the maintenance window.
--
-- Default: Inherits from the source DB instance
--
-- 'dbSubnetGroupName', 'createDBInstanceReadReplica_dbSubnetGroupName' - Specifies a DB subnet group for the DB instance. The new DB instance is
-- created in the VPC associated with the DB subnet group. If no DB subnet
-- group is specified, then the new DB instance isn\'t created in a VPC.
--
-- Constraints:
--
-- -   Can only be specified if the source DB instance identifier specifies
--     a DB instance in another Amazon Web Services Region.
--
-- -   If supplied, must match the name of an existing DBSubnetGroup.
--
-- -   The specified DB subnet group must be in the same Amazon Web
--     Services Region in which the operation is running.
--
-- -   All read replicas in one Amazon Web Services Region that are created
--     from the same source DB instance must either:>
--
--     -   Specify DB subnet groups from the same VPC. All these read
--         replicas are created in the same VPC.
--
--     -   Not specify a DB subnet group. All these read replicas are
--         created outside of any VPC.
--
-- Example: @mySubnetgroup@
--
-- 'monitoringRoleArn', 'createDBInstanceReadReplica_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.html#USER_Monitoring.OS.IAMRole To create an IAM role for Amazon RDS 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', 'createDBInstanceReadReplica_iops' - The amount of Provisioned IOPS (input\/output operations per second) to
-- be initially allocated for the DB instance.
--
-- 'domain', 'createDBInstanceReadReplica_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/.
--
-- 'replicaMode', 'createDBInstanceReadReplica_replicaMode' - The open mode of the replica database: mounted or read-only.
--
-- This parameter is only supported for Oracle DB instances.
--
-- Mounted DB replicas are included in Oracle Enterprise Edition. The main
-- use case for mounted replicas is cross-Region disaster recovery. The
-- primary database doesn\'t use Active Data Guard to transmit information
-- to the mounted replica. Because it doesn\'t accept user connections, a
-- mounted replica can\'t serve a read-only workload.
--
-- You can create a combination of mounted and read-only DB replicas for
-- the same primary DB instance. For more information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-read-replicas.html Working with Oracle Read Replicas for Amazon RDS>
-- in the /Amazon RDS User Guide/.
--
-- 'monitoringInterval', 'createDBInstanceReadReplica_monitoringInterval' - The interval, in seconds, between points when Enhanced Monitoring
-- metrics are collected for the read replica. 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@
--
-- 'preSignedUrl', 'createDBInstanceReadReplica_preSignedUrl' - The URL that contains a Signature Version 4 signed request for the
-- @CreateDBInstanceReadReplica@ API action in the source Amazon Web
-- Services Region that contains the source DB instance.
--
-- You must specify this parameter when you create an encrypted read
-- replica from another Amazon Web Services Region by using the Amazon RDS
-- API. Don\'t specify @PreSignedUrl@ when you are creating an encrypted
-- read replica in the same Amazon Web Services Region.
--
-- The presigned URL must be a valid request for the
-- @CreateDBInstanceReadReplica@ API action that can be executed in the
-- source Amazon Web Services Region that contains the encrypted source DB
-- instance. The presigned URL request must contain the following parameter
-- values:
--
-- -   @DestinationRegion@ - The Amazon Web Services Region that the
--     encrypted read replica is created in. This Amazon Web Services
--     Region is the same one where the @CreateDBInstanceReadReplica@
--     action is called that contains this presigned URL.
--
--     For example, if you create an encrypted DB instance in the us-west-1
--     Amazon Web Services Region, from a source DB instance in the
--     us-east-2 Amazon Web Services Region, then you call the
--     @CreateDBInstanceReadReplica@ action in the us-east-1 Amazon Web
--     Services Region and provide a presigned URL that contains a call to
--     the @CreateDBInstanceReadReplica@ action in the us-west-2 Amazon Web
--     Services Region. For this example, the @DestinationRegion@ in the
--     presigned URL must be set to the us-east-1 Amazon Web Services
--     Region.
--
-- -   @KmsKeyId@ - The Amazon Web Services KMS key identifier for the key
--     to use to encrypt the read replica in the destination Amazon Web
--     Services Region. This is the same identifier for both the
--     @CreateDBInstanceReadReplica@ action that is called in the
--     destination Amazon Web Services Region, and the action contained in
--     the presigned URL.
--
-- -   @SourceDBInstanceIdentifier@ - The DB instance identifier for the
--     encrypted DB instance to be replicated. This identifier must be in
--     the Amazon Resource Name (ARN) format for the source Amazon Web
--     Services Region. For example, if you are creating an encrypted read
--     replica from a DB instance in the us-west-2 Amazon Web Services
--     Region, then your @SourceDBInstanceIdentifier@ looks like the
--     following example:
--     @arn:aws:rds:us-west-2:123456789012:instance:mysql-instance1-20161115@.
--
-- To learn how to generate a Signature Version 4 signed request, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4)>
-- and
-- <https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html Signature Version 4 Signing Process>.
--
-- If you are using an Amazon Web Services SDK tool or the CLI, you can
-- specify @SourceRegion@ (or @--source-region@ for the CLI) instead of
-- specifying @PreSignedUrl@ manually. Specifying @SourceRegion@
-- autogenerates a presigned URL that is a valid request for the operation
-- that can be executed in the source Amazon Web Services Region.
--
-- @SourceRegion@ isn\'t supported for SQL Server, because SQL Server on
-- Amazon RDS doesn\'t support cross-region read replicas.
--
-- 'processorFeatures', 'createDBInstanceReadReplica_processorFeatures' - The number of CPU cores and the number of threads per core for the DB
-- instance class of the DB instance.
--
-- 'dbInstanceClass', 'createDBInstanceReadReplica_dbInstanceClass' - The compute and memory capacity of the read replica, 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./
--
-- Default: Inherits from the source DB instance.
--
-- 'performanceInsightsRetentionPeriod', 'createDBInstanceReadReplica_performanceInsightsRetentionPeriod' - The amount of time, in days, to retain Performance Insights data. Valid
-- values are 7 or 731 (2 years).
--
-- 'destinationRegion', 'createDBInstanceReadReplica_destinationRegion' - Pseudo-parameter used when populating the @PreSignedUrl@ of a
-- cross-region @CreateDBInstanceReadReplica@ request. To replicate from
-- region @SRC@ to region @DST@, send a request to region @DST@. In that
-- request, pass a @PreSignedUrl@ for region @SRC@ with @DestinationRegion@
-- set to region @DST@.
--
-- 'maxAllocatedStorage', 'createDBInstanceReadReplica_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', 'createDBInstanceReadReplica_enablePerformanceInsights' - A value that indicates whether to enable Performance Insights for the
-- read replica.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html Using Amazon Performance Insights>
-- in the /Amazon RDS User Guide/.
--
-- 'kmsKeyId', 'createDBInstanceReadReplica_kmsKeyId' - The Amazon Web Services KMS key identifier for an encrypted read
-- replica.
--
-- The Amazon Web Services KMS key identifier is the key ARN, key ID, alias
-- ARN, or alias name for the Amazon Web Services KMS CMK.
--
-- If you create an encrypted read replica in the same Amazon Web Services
-- Region as the source DB instance, then do not specify a value for this
-- parameter. A read replica in the same Region is always encrypted with
-- the same Amazon Web Services KMS CMK as the source DB instance.
--
-- If you create an encrypted read replica in a different Amazon Web
-- Services Region, then you must specify a Amazon Web Services KMS key
-- identifier for the destination Amazon Web Services Region. Amazon Web
-- Services KMS CMKs are specific to the Amazon Web Services Region that
-- they are created in, and you can\'t use CMKs from one Amazon Web
-- Services Region in another Amazon Web Services Region.
--
-- You can\'t create an encrypted read replica from an unencrypted DB
-- instance.
--
-- 'dbParameterGroupName', 'createDBInstanceReadReplica_dbParameterGroupName' - The name of the DB parameter group to associate with this DB instance.
--
-- If you do not specify a value for @DBParameterGroupName@, then Amazon
-- RDS uses the @DBParameterGroup@ of source DB instance for a same region
-- read replica, or the default @DBParameterGroup@ for the specified DB
-- engine for a cross region read replica.
--
-- Currently, specifying a parameter group for this operation is only
-- supported for Oracle DB instances.
--
-- 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
--
-- 'availabilityZone', 'createDBInstanceReadReplica_availabilityZone' - The Availability Zone (AZ) where the read replica will be created.
--
-- Default: A random, system-chosen Availability Zone in the endpoint\'s
-- Amazon Web Services Region.
--
-- Example: @us-east-1d@
--
-- 'performanceInsightsKMSKeyId', 'createDBInstanceReadReplica_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', 'createDBInstanceReadReplica_vpcSecurityGroupIds' - A list of EC2 VPC security groups to associate with the read replica.
--
-- Default: The default EC2 VPC security group for the DB subnet group\'s
-- VPC.
--
-- 'multiAZ', 'createDBInstanceReadReplica_multiAZ' - A value that indicates whether the read replica is in a Multi-AZ
-- deployment.
--
-- You can create a read replica as a Multi-AZ DB instance. RDS creates a
-- standby of your replica in another Availability Zone for failover
-- support for the replica. Creating your read replica as a Multi-AZ DB
-- instance is independent of whether the source database is a Multi-AZ DB
-- instance.
--
-- 'optionGroupName', 'createDBInstanceReadReplica_optionGroupName' - The option group the DB instance is associated with. If omitted, the
-- option group associated with the source instance is used.
--
-- For SQL Server, you must use the option group associated with the source
-- instance.
--
-- 'copyTagsToSnapshot', 'createDBInstanceReadReplica_copyTagsToSnapshot' - A value that indicates whether to copy all tags from the read replica to
-- snapshots of the read replica. By default, tags are not copied.
--
-- 'domainIAMRoleName', 'createDBInstanceReadReplica_domainIAMRoleName' - Specify the name of the IAM role to be used when making API calls to the
-- Directory Service.
--
-- 'tags', 'createDBInstanceReadReplica_tags' - Undocumented member.
--
-- 'port', 'createDBInstanceReadReplica_port' - The port number that the DB instance uses for connections.
--
-- Default: Inherits from the source DB instance
--
-- Valid Values: @1150-65535@
--
-- 'enableIAMDatabaseAuthentication', 'createDBInstanceReadReplica_enableIAMDatabaseAuthentication' - A value that indicates whether to enable mapping of Amazon Web Services
-- Identity and Access Management (IAM) accounts to database accounts. By
-- default, mapping is disabled.
--
-- For more information about IAM database authentication, 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./
--
-- 'useDefaultProcessorFeatures', 'createDBInstanceReadReplica_useDefaultProcessorFeatures' - A value that indicates whether the DB instance class of the DB instance
-- uses its default processor features.
--
-- 'storageType', 'createDBInstanceReadReplica_storageType' - Specifies the storage type to be associated with the read replica.
--
-- 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', 'createDBInstanceReadReplica_enableCloudwatchLogsExports' - The list of logs that the new DB instance is to export 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 RDS User Guide/.
--
-- 'dbInstanceIdentifier', 'createDBInstanceReadReplica_dbInstanceIdentifier' - The DB instance identifier of the read replica. This identifier is the
-- unique key that identifies a DB instance. This parameter is stored as a
-- lowercase string.
--
-- 'sourceDBInstanceIdentifier', 'createDBInstanceReadReplica_sourceDBInstanceIdentifier' - The identifier of the DB instance that will act as the source for the
-- read replica. Each DB instance can have up to five read replicas.
--
-- Constraints:
--
-- -   Must be the identifier of an existing MySQL, MariaDB, Oracle,
--     PostgreSQL, or SQL Server DB instance.
--
-- -   Can specify a DB instance that is a MySQL read replica only if the
--     source is running MySQL 5.6 or later.
--
-- -   For the limitations of Oracle read replicas, see
--     <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-read-replicas.html Read Replica Limitations with Oracle>
--     in the /Amazon RDS User Guide/.
--
-- -   For the limitations of SQL Server read replicas, see
--     <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/SQLServer.ReadReplicas.Limitations.html Read Replica Limitations with Microsoft SQL Server>
--     in the /Amazon RDS User Guide/.
--
-- -   Can specify a PostgreSQL DB instance only if the source is running
--     PostgreSQL 9.3.5 or later (9.4.7 and higher for cross-region
--     replication).
--
-- -   The specified DB instance must have automatic backups enabled, that
--     is, its backup retention period must be greater than 0.
--
-- -   If the source DB instance is in the same Amazon Web Services Region
--     as the read replica, specify a valid DB instance identifier.
--
-- -   If the source DB instance is in a different Amazon Web Services
--     Region from the read replica, specify a valid DB instance ARN. For
--     more information, see
--     <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing Constructing an ARN for Amazon RDS>
--     in the /Amazon RDS User Guide/. This doesn\'t apply to SQL Server,
--     which doesn\'t support cross-region replicas.
newCreateDBInstanceReadReplica ::
  -- | 'dbInstanceIdentifier'
  Prelude.Text ->
  -- | 'sourceDBInstanceIdentifier'
  Prelude.Text ->
  CreateDBInstanceReadReplica
newCreateDBInstanceReadReplica :: Text -> Text -> CreateDBInstanceReadReplica
newCreateDBInstanceReadReplica
  Text
pDBInstanceIdentifier_
  Text
pSourceDBInstanceIdentifier_ =
    CreateDBInstanceReadReplica' :: Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe ReplicaMode
-> Maybe Int
-> Maybe Text
-> Maybe [ProcessorFeature]
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [Tag]
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Text
-> Text
-> CreateDBInstanceReadReplica
CreateDBInstanceReadReplica'
      { $sel:deletionProtection:CreateDBInstanceReadReplica' :: Maybe Bool
deletionProtection =
          Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:publiclyAccessible:CreateDBInstanceReadReplica' :: Maybe Bool
publiclyAccessible = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:autoMinorVersionUpgrade:CreateDBInstanceReadReplica' :: Maybe Bool
autoMinorVersionUpgrade = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:dbSubnetGroupName:CreateDBInstanceReadReplica' :: Maybe Text
dbSubnetGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:monitoringRoleArn:CreateDBInstanceReadReplica' :: Maybe Text
monitoringRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:iops:CreateDBInstanceReadReplica' :: Maybe Int
iops = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:domain:CreateDBInstanceReadReplica' :: Maybe Text
domain = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:replicaMode:CreateDBInstanceReadReplica' :: Maybe ReplicaMode
replicaMode = Maybe ReplicaMode
forall a. Maybe a
Prelude.Nothing,
        $sel:monitoringInterval:CreateDBInstanceReadReplica' :: Maybe Int
monitoringInterval = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:preSignedUrl:CreateDBInstanceReadReplica' :: Maybe Text
preSignedUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:processorFeatures:CreateDBInstanceReadReplica' :: Maybe [ProcessorFeature]
processorFeatures = Maybe [ProcessorFeature]
forall a. Maybe a
Prelude.Nothing,
        $sel:dbInstanceClass:CreateDBInstanceReadReplica' :: Maybe Text
dbInstanceClass = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:performanceInsightsRetentionPeriod:CreateDBInstanceReadReplica' :: Maybe Int
performanceInsightsRetentionPeriod =
          Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:destinationRegion:CreateDBInstanceReadReplica' :: Maybe Text
destinationRegion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:maxAllocatedStorage:CreateDBInstanceReadReplica' :: Maybe Int
maxAllocatedStorage = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:enablePerformanceInsights:CreateDBInstanceReadReplica' :: Maybe Bool
enablePerformanceInsights = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:kmsKeyId:CreateDBInstanceReadReplica' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:dbParameterGroupName:CreateDBInstanceReadReplica' :: Maybe Text
dbParameterGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:availabilityZone:CreateDBInstanceReadReplica' :: Maybe Text
availabilityZone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:performanceInsightsKMSKeyId:CreateDBInstanceReadReplica' :: Maybe Text
performanceInsightsKMSKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:vpcSecurityGroupIds:CreateDBInstanceReadReplica' :: Maybe [Text]
vpcSecurityGroupIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:multiAZ:CreateDBInstanceReadReplica' :: Maybe Bool
multiAZ = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:optionGroupName:CreateDBInstanceReadReplica' :: Maybe Text
optionGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:copyTagsToSnapshot:CreateDBInstanceReadReplica' :: Maybe Bool
copyTagsToSnapshot = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:domainIAMRoleName:CreateDBInstanceReadReplica' :: Maybe Text
domainIAMRoleName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateDBInstanceReadReplica' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:port:CreateDBInstanceReadReplica' :: Maybe Int
port = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:enableIAMDatabaseAuthentication:CreateDBInstanceReadReplica' :: Maybe Bool
enableIAMDatabaseAuthentication =
          Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:useDefaultProcessorFeatures:CreateDBInstanceReadReplica' :: Maybe Bool
useDefaultProcessorFeatures = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:storageType:CreateDBInstanceReadReplica' :: Maybe Text
storageType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:enableCloudwatchLogsExports:CreateDBInstanceReadReplica' :: Maybe [Text]
enableCloudwatchLogsExports = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:dbInstanceIdentifier:CreateDBInstanceReadReplica' :: Text
dbInstanceIdentifier = Text
pDBInstanceIdentifier_,
        $sel:sourceDBInstanceIdentifier:CreateDBInstanceReadReplica' :: Text
sourceDBInstanceIdentifier =
          Text
pSourceDBInstanceIdentifier_
      }

-- | 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>.
createDBInstanceReadReplica_deletionProtection :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe Prelude.Bool)
createDBInstanceReadReplica_deletionProtection :: (Maybe Bool -> f (Maybe Bool))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_deletionProtection = (CreateDBInstanceReadReplica -> Maybe Bool)
-> (CreateDBInstanceReadReplica
    -> Maybe Bool -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe Bool
deletionProtection :: Maybe Bool
$sel:deletionProtection:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Bool
deletionProtection} -> Maybe Bool
deletionProtection) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe Bool
a -> CreateDBInstanceReadReplica
s {$sel:deletionProtection:CreateDBInstanceReadReplica' :: Maybe Bool
deletionProtection = Maybe Bool
a} :: CreateDBInstanceReadReplica)

-- | 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.
--
-- For more information, see CreateDBInstance.
createDBInstanceReadReplica_publiclyAccessible :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe Prelude.Bool)
createDBInstanceReadReplica_publiclyAccessible :: (Maybe Bool -> f (Maybe Bool))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_publiclyAccessible = (CreateDBInstanceReadReplica -> Maybe Bool)
-> (CreateDBInstanceReadReplica
    -> Maybe Bool -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe Bool
publiclyAccessible :: Maybe Bool
$sel:publiclyAccessible:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Bool
publiclyAccessible} -> Maybe Bool
publiclyAccessible) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe Bool
a -> CreateDBInstanceReadReplica
s {$sel:publiclyAccessible:CreateDBInstanceReadReplica' :: Maybe Bool
publiclyAccessible = Maybe Bool
a} :: CreateDBInstanceReadReplica)

-- | A value that indicates whether minor engine upgrades are applied
-- automatically to the read replica during the maintenance window.
--
-- Default: Inherits from the source DB instance
createDBInstanceReadReplica_autoMinorVersionUpgrade :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe Prelude.Bool)
createDBInstanceReadReplica_autoMinorVersionUpgrade :: (Maybe Bool -> f (Maybe Bool))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_autoMinorVersionUpgrade = (CreateDBInstanceReadReplica -> Maybe Bool)
-> (CreateDBInstanceReadReplica
    -> Maybe Bool -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe Bool
autoMinorVersionUpgrade :: Maybe Bool
$sel:autoMinorVersionUpgrade:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Bool
autoMinorVersionUpgrade} -> Maybe Bool
autoMinorVersionUpgrade) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe Bool
a -> CreateDBInstanceReadReplica
s {$sel:autoMinorVersionUpgrade:CreateDBInstanceReadReplica' :: Maybe Bool
autoMinorVersionUpgrade = Maybe Bool
a} :: CreateDBInstanceReadReplica)

-- | Specifies a DB subnet group for the DB instance. The new DB instance is
-- created in the VPC associated with the DB subnet group. If no DB subnet
-- group is specified, then the new DB instance isn\'t created in a VPC.
--
-- Constraints:
--
-- -   Can only be specified if the source DB instance identifier specifies
--     a DB instance in another Amazon Web Services Region.
--
-- -   If supplied, must match the name of an existing DBSubnetGroup.
--
-- -   The specified DB subnet group must be in the same Amazon Web
--     Services Region in which the operation is running.
--
-- -   All read replicas in one Amazon Web Services Region that are created
--     from the same source DB instance must either:>
--
--     -   Specify DB subnet groups from the same VPC. All these read
--         replicas are created in the same VPC.
--
--     -   Not specify a DB subnet group. All these read replicas are
--         created outside of any VPC.
--
-- Example: @mySubnetgroup@
createDBInstanceReadReplica_dbSubnetGroupName :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe Prelude.Text)
createDBInstanceReadReplica_dbSubnetGroupName :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_dbSubnetGroupName = (CreateDBInstanceReadReplica -> Maybe Text)
-> (CreateDBInstanceReadReplica
    -> Maybe Text -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe Text
dbSubnetGroupName :: Maybe Text
$sel:dbSubnetGroupName:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Text
dbSubnetGroupName} -> Maybe Text
dbSubnetGroupName) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe Text
a -> CreateDBInstanceReadReplica
s {$sel:dbSubnetGroupName:CreateDBInstanceReadReplica' :: Maybe Text
dbSubnetGroupName = Maybe Text
a} :: CreateDBInstanceReadReplica)

-- | 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.html#USER_Monitoring.OS.IAMRole To create an IAM role for Amazon RDS 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.
createDBInstanceReadReplica_monitoringRoleArn :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe Prelude.Text)
createDBInstanceReadReplica_monitoringRoleArn :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_monitoringRoleArn = (CreateDBInstanceReadReplica -> Maybe Text)
-> (CreateDBInstanceReadReplica
    -> Maybe Text -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe Text
monitoringRoleArn :: Maybe Text
$sel:monitoringRoleArn:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Text
monitoringRoleArn} -> Maybe Text
monitoringRoleArn) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe Text
a -> CreateDBInstanceReadReplica
s {$sel:monitoringRoleArn:CreateDBInstanceReadReplica' :: Maybe Text
monitoringRoleArn = Maybe Text
a} :: CreateDBInstanceReadReplica)

-- | The amount of Provisioned IOPS (input\/output operations per second) to
-- be initially allocated for the DB instance.
createDBInstanceReadReplica_iops :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe Prelude.Int)
createDBInstanceReadReplica_iops :: (Maybe Int -> f (Maybe Int))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_iops = (CreateDBInstanceReadReplica -> Maybe Int)
-> (CreateDBInstanceReadReplica
    -> Maybe Int -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe Int
iops :: Maybe Int
$sel:iops:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Int
iops} -> Maybe Int
iops) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe Int
a -> CreateDBInstanceReadReplica
s {$sel:iops:CreateDBInstanceReadReplica' :: Maybe Int
iops = Maybe Int
a} :: CreateDBInstanceReadReplica)

-- | 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/.
createDBInstanceReadReplica_domain :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe Prelude.Text)
createDBInstanceReadReplica_domain :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_domain = (CreateDBInstanceReadReplica -> Maybe Text)
-> (CreateDBInstanceReadReplica
    -> Maybe Text -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe Text
domain :: Maybe Text
$sel:domain:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Text
domain} -> Maybe Text
domain) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe Text
a -> CreateDBInstanceReadReplica
s {$sel:domain:CreateDBInstanceReadReplica' :: Maybe Text
domain = Maybe Text
a} :: CreateDBInstanceReadReplica)

-- | The open mode of the replica database: mounted or read-only.
--
-- This parameter is only supported for Oracle DB instances.
--
-- Mounted DB replicas are included in Oracle Enterprise Edition. The main
-- use case for mounted replicas is cross-Region disaster recovery. The
-- primary database doesn\'t use Active Data Guard to transmit information
-- to the mounted replica. Because it doesn\'t accept user connections, a
-- mounted replica can\'t serve a read-only workload.
--
-- You can create a combination of mounted and read-only DB replicas for
-- the same primary DB instance. For more information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-read-replicas.html Working with Oracle Read Replicas for Amazon RDS>
-- in the /Amazon RDS User Guide/.
createDBInstanceReadReplica_replicaMode :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe ReplicaMode)
createDBInstanceReadReplica_replicaMode :: (Maybe ReplicaMode -> f (Maybe ReplicaMode))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_replicaMode = (CreateDBInstanceReadReplica -> Maybe ReplicaMode)
-> (CreateDBInstanceReadReplica
    -> Maybe ReplicaMode -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe ReplicaMode)
     (Maybe ReplicaMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe ReplicaMode
replicaMode :: Maybe ReplicaMode
$sel:replicaMode:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe ReplicaMode
replicaMode} -> Maybe ReplicaMode
replicaMode) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe ReplicaMode
a -> CreateDBInstanceReadReplica
s {$sel:replicaMode:CreateDBInstanceReadReplica' :: Maybe ReplicaMode
replicaMode = Maybe ReplicaMode
a} :: CreateDBInstanceReadReplica)

-- | The interval, in seconds, between points when Enhanced Monitoring
-- metrics are collected for the read replica. 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@
createDBInstanceReadReplica_monitoringInterval :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe Prelude.Int)
createDBInstanceReadReplica_monitoringInterval :: (Maybe Int -> f (Maybe Int))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_monitoringInterval = (CreateDBInstanceReadReplica -> Maybe Int)
-> (CreateDBInstanceReadReplica
    -> Maybe Int -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe Int
monitoringInterval :: Maybe Int
$sel:monitoringInterval:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Int
monitoringInterval} -> Maybe Int
monitoringInterval) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe Int
a -> CreateDBInstanceReadReplica
s {$sel:monitoringInterval:CreateDBInstanceReadReplica' :: Maybe Int
monitoringInterval = Maybe Int
a} :: CreateDBInstanceReadReplica)

-- | The URL that contains a Signature Version 4 signed request for the
-- @CreateDBInstanceReadReplica@ API action in the source Amazon Web
-- Services Region that contains the source DB instance.
--
-- You must specify this parameter when you create an encrypted read
-- replica from another Amazon Web Services Region by using the Amazon RDS
-- API. Don\'t specify @PreSignedUrl@ when you are creating an encrypted
-- read replica in the same Amazon Web Services Region.
--
-- The presigned URL must be a valid request for the
-- @CreateDBInstanceReadReplica@ API action that can be executed in the
-- source Amazon Web Services Region that contains the encrypted source DB
-- instance. The presigned URL request must contain the following parameter
-- values:
--
-- -   @DestinationRegion@ - The Amazon Web Services Region that the
--     encrypted read replica is created in. This Amazon Web Services
--     Region is the same one where the @CreateDBInstanceReadReplica@
--     action is called that contains this presigned URL.
--
--     For example, if you create an encrypted DB instance in the us-west-1
--     Amazon Web Services Region, from a source DB instance in the
--     us-east-2 Amazon Web Services Region, then you call the
--     @CreateDBInstanceReadReplica@ action in the us-east-1 Amazon Web
--     Services Region and provide a presigned URL that contains a call to
--     the @CreateDBInstanceReadReplica@ action in the us-west-2 Amazon Web
--     Services Region. For this example, the @DestinationRegion@ in the
--     presigned URL must be set to the us-east-1 Amazon Web Services
--     Region.
--
-- -   @KmsKeyId@ - The Amazon Web Services KMS key identifier for the key
--     to use to encrypt the read replica in the destination Amazon Web
--     Services Region. This is the same identifier for both the
--     @CreateDBInstanceReadReplica@ action that is called in the
--     destination Amazon Web Services Region, and the action contained in
--     the presigned URL.
--
-- -   @SourceDBInstanceIdentifier@ - The DB instance identifier for the
--     encrypted DB instance to be replicated. This identifier must be in
--     the Amazon Resource Name (ARN) format for the source Amazon Web
--     Services Region. For example, if you are creating an encrypted read
--     replica from a DB instance in the us-west-2 Amazon Web Services
--     Region, then your @SourceDBInstanceIdentifier@ looks like the
--     following example:
--     @arn:aws:rds:us-west-2:123456789012:instance:mysql-instance1-20161115@.
--
-- To learn how to generate a Signature Version 4 signed request, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4)>
-- and
-- <https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html Signature Version 4 Signing Process>.
--
-- If you are using an Amazon Web Services SDK tool or the CLI, you can
-- specify @SourceRegion@ (or @--source-region@ for the CLI) instead of
-- specifying @PreSignedUrl@ manually. Specifying @SourceRegion@
-- autogenerates a presigned URL that is a valid request for the operation
-- that can be executed in the source Amazon Web Services Region.
--
-- @SourceRegion@ isn\'t supported for SQL Server, because SQL Server on
-- Amazon RDS doesn\'t support cross-region read replicas.
createDBInstanceReadReplica_preSignedUrl :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe Prelude.Text)
createDBInstanceReadReplica_preSignedUrl :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_preSignedUrl = (CreateDBInstanceReadReplica -> Maybe Text)
-> (CreateDBInstanceReadReplica
    -> Maybe Text -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe Text
preSignedUrl :: Maybe Text
$sel:preSignedUrl:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Text
preSignedUrl} -> Maybe Text
preSignedUrl) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe Text
a -> CreateDBInstanceReadReplica
s {$sel:preSignedUrl:CreateDBInstanceReadReplica' :: Maybe Text
preSignedUrl = Maybe Text
a} :: CreateDBInstanceReadReplica)

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

-- | The compute and memory capacity of the read replica, 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./
--
-- Default: Inherits from the source DB instance.
createDBInstanceReadReplica_dbInstanceClass :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe Prelude.Text)
createDBInstanceReadReplica_dbInstanceClass :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_dbInstanceClass = (CreateDBInstanceReadReplica -> Maybe Text)
-> (CreateDBInstanceReadReplica
    -> Maybe Text -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe Text
dbInstanceClass :: Maybe Text
$sel:dbInstanceClass:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Text
dbInstanceClass} -> Maybe Text
dbInstanceClass) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe Text
a -> CreateDBInstanceReadReplica
s {$sel:dbInstanceClass:CreateDBInstanceReadReplica' :: Maybe Text
dbInstanceClass = Maybe Text
a} :: CreateDBInstanceReadReplica)

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

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

-- | 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/.
createDBInstanceReadReplica_maxAllocatedStorage :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe Prelude.Int)
createDBInstanceReadReplica_maxAllocatedStorage :: (Maybe Int -> f (Maybe Int))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_maxAllocatedStorage = (CreateDBInstanceReadReplica -> Maybe Int)
-> (CreateDBInstanceReadReplica
    -> Maybe Int -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe Int
maxAllocatedStorage :: Maybe Int
$sel:maxAllocatedStorage:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Int
maxAllocatedStorage} -> Maybe Int
maxAllocatedStorage) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe Int
a -> CreateDBInstanceReadReplica
s {$sel:maxAllocatedStorage:CreateDBInstanceReadReplica' :: Maybe Int
maxAllocatedStorage = Maybe Int
a} :: CreateDBInstanceReadReplica)

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

-- | The Amazon Web Services KMS key identifier for an encrypted read
-- replica.
--
-- The Amazon Web Services KMS key identifier is the key ARN, key ID, alias
-- ARN, or alias name for the Amazon Web Services KMS CMK.
--
-- If you create an encrypted read replica in the same Amazon Web Services
-- Region as the source DB instance, then do not specify a value for this
-- parameter. A read replica in the same Region is always encrypted with
-- the same Amazon Web Services KMS CMK as the source DB instance.
--
-- If you create an encrypted read replica in a different Amazon Web
-- Services Region, then you must specify a Amazon Web Services KMS key
-- identifier for the destination Amazon Web Services Region. Amazon Web
-- Services KMS CMKs are specific to the Amazon Web Services Region that
-- they are created in, and you can\'t use CMKs from one Amazon Web
-- Services Region in another Amazon Web Services Region.
--
-- You can\'t create an encrypted read replica from an unencrypted DB
-- instance.
createDBInstanceReadReplica_kmsKeyId :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe Prelude.Text)
createDBInstanceReadReplica_kmsKeyId :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_kmsKeyId = (CreateDBInstanceReadReplica -> Maybe Text)
-> (CreateDBInstanceReadReplica
    -> Maybe Text -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe Text
a -> CreateDBInstanceReadReplica
s {$sel:kmsKeyId:CreateDBInstanceReadReplica' :: Maybe Text
kmsKeyId = Maybe Text
a} :: CreateDBInstanceReadReplica)

-- | The name of the DB parameter group to associate with this DB instance.
--
-- If you do not specify a value for @DBParameterGroupName@, then Amazon
-- RDS uses the @DBParameterGroup@ of source DB instance for a same region
-- read replica, or the default @DBParameterGroup@ for the specified DB
-- engine for a cross region read replica.
--
-- Currently, specifying a parameter group for this operation is only
-- supported for Oracle DB instances.
--
-- 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
createDBInstanceReadReplica_dbParameterGroupName :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe Prelude.Text)
createDBInstanceReadReplica_dbParameterGroupName :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_dbParameterGroupName = (CreateDBInstanceReadReplica -> Maybe Text)
-> (CreateDBInstanceReadReplica
    -> Maybe Text -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe Text
dbParameterGroupName :: Maybe Text
$sel:dbParameterGroupName:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Text
dbParameterGroupName} -> Maybe Text
dbParameterGroupName) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe Text
a -> CreateDBInstanceReadReplica
s {$sel:dbParameterGroupName:CreateDBInstanceReadReplica' :: Maybe Text
dbParameterGroupName = Maybe Text
a} :: CreateDBInstanceReadReplica)

-- | The Availability Zone (AZ) where the read replica will be created.
--
-- Default: A random, system-chosen Availability Zone in the endpoint\'s
-- Amazon Web Services Region.
--
-- Example: @us-east-1d@
createDBInstanceReadReplica_availabilityZone :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe Prelude.Text)
createDBInstanceReadReplica_availabilityZone :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_availabilityZone = (CreateDBInstanceReadReplica -> Maybe Text)
-> (CreateDBInstanceReadReplica
    -> Maybe Text -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe Text
availabilityZone :: Maybe Text
$sel:availabilityZone:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Text
availabilityZone} -> Maybe Text
availabilityZone) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe Text
a -> CreateDBInstanceReadReplica
s {$sel:availabilityZone:CreateDBInstanceReadReplica' :: Maybe Text
availabilityZone = Maybe Text
a} :: CreateDBInstanceReadReplica)

-- | 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.
createDBInstanceReadReplica_performanceInsightsKMSKeyId :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe Prelude.Text)
createDBInstanceReadReplica_performanceInsightsKMSKeyId :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_performanceInsightsKMSKeyId = (CreateDBInstanceReadReplica -> Maybe Text)
-> (CreateDBInstanceReadReplica
    -> Maybe Text -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe Text
performanceInsightsKMSKeyId :: Maybe Text
$sel:performanceInsightsKMSKeyId:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Text
performanceInsightsKMSKeyId} -> Maybe Text
performanceInsightsKMSKeyId) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe Text
a -> CreateDBInstanceReadReplica
s {$sel:performanceInsightsKMSKeyId:CreateDBInstanceReadReplica' :: Maybe Text
performanceInsightsKMSKeyId = Maybe Text
a} :: CreateDBInstanceReadReplica)

-- | A list of EC2 VPC security groups to associate with the read replica.
--
-- Default: The default EC2 VPC security group for the DB subnet group\'s
-- VPC.
createDBInstanceReadReplica_vpcSecurityGroupIds :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe [Prelude.Text])
createDBInstanceReadReplica_vpcSecurityGroupIds :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_vpcSecurityGroupIds = (CreateDBInstanceReadReplica -> Maybe [Text])
-> (CreateDBInstanceReadReplica
    -> Maybe [Text] -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe [Text]
vpcSecurityGroupIds :: Maybe [Text]
$sel:vpcSecurityGroupIds:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe [Text]
vpcSecurityGroupIds} -> Maybe [Text]
vpcSecurityGroupIds) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe [Text]
a -> CreateDBInstanceReadReplica
s {$sel:vpcSecurityGroupIds:CreateDBInstanceReadReplica' :: Maybe [Text]
vpcSecurityGroupIds = Maybe [Text]
a} :: CreateDBInstanceReadReplica) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateDBInstanceReadReplica
-> f CreateDBInstanceReadReplica
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 read replica is in a Multi-AZ
-- deployment.
--
-- You can create a read replica as a Multi-AZ DB instance. RDS creates a
-- standby of your replica in another Availability Zone for failover
-- support for the replica. Creating your read replica as a Multi-AZ DB
-- instance is independent of whether the source database is a Multi-AZ DB
-- instance.
createDBInstanceReadReplica_multiAZ :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe Prelude.Bool)
createDBInstanceReadReplica_multiAZ :: (Maybe Bool -> f (Maybe Bool))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_multiAZ = (CreateDBInstanceReadReplica -> Maybe Bool)
-> (CreateDBInstanceReadReplica
    -> Maybe Bool -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe Bool
multiAZ :: Maybe Bool
$sel:multiAZ:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Bool
multiAZ} -> Maybe Bool
multiAZ) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe Bool
a -> CreateDBInstanceReadReplica
s {$sel:multiAZ:CreateDBInstanceReadReplica' :: Maybe Bool
multiAZ = Maybe Bool
a} :: CreateDBInstanceReadReplica)

-- | The option group the DB instance is associated with. If omitted, the
-- option group associated with the source instance is used.
--
-- For SQL Server, you must use the option group associated with the source
-- instance.
createDBInstanceReadReplica_optionGroupName :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe Prelude.Text)
createDBInstanceReadReplica_optionGroupName :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_optionGroupName = (CreateDBInstanceReadReplica -> Maybe Text)
-> (CreateDBInstanceReadReplica
    -> Maybe Text -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe Text
optionGroupName :: Maybe Text
$sel:optionGroupName:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Text
optionGroupName} -> Maybe Text
optionGroupName) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe Text
a -> CreateDBInstanceReadReplica
s {$sel:optionGroupName:CreateDBInstanceReadReplica' :: Maybe Text
optionGroupName = Maybe Text
a} :: CreateDBInstanceReadReplica)

-- | A value that indicates whether to copy all tags from the read replica to
-- snapshots of the read replica. By default, tags are not copied.
createDBInstanceReadReplica_copyTagsToSnapshot :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe Prelude.Bool)
createDBInstanceReadReplica_copyTagsToSnapshot :: (Maybe Bool -> f (Maybe Bool))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_copyTagsToSnapshot = (CreateDBInstanceReadReplica -> Maybe Bool)
-> (CreateDBInstanceReadReplica
    -> Maybe Bool -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe Bool
copyTagsToSnapshot :: Maybe Bool
$sel:copyTagsToSnapshot:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Bool
copyTagsToSnapshot} -> Maybe Bool
copyTagsToSnapshot) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe Bool
a -> CreateDBInstanceReadReplica
s {$sel:copyTagsToSnapshot:CreateDBInstanceReadReplica' :: Maybe Bool
copyTagsToSnapshot = Maybe Bool
a} :: CreateDBInstanceReadReplica)

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

-- | Undocumented member.
createDBInstanceReadReplica_tags :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe [Tag])
createDBInstanceReadReplica_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_tags = (CreateDBInstanceReadReplica -> Maybe [Tag])
-> (CreateDBInstanceReadReplica
    -> Maybe [Tag] -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe [Tag]
a -> CreateDBInstanceReadReplica
s {$sel:tags:CreateDBInstanceReadReplica' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateDBInstanceReadReplica) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDBInstanceReadReplica
-> f CreateDBInstanceReadReplica
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 that the DB instance uses for connections.
--
-- Default: Inherits from the source DB instance
--
-- Valid Values: @1150-65535@
createDBInstanceReadReplica_port :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe Prelude.Int)
createDBInstanceReadReplica_port :: (Maybe Int -> f (Maybe Int))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_port = (CreateDBInstanceReadReplica -> Maybe Int)
-> (CreateDBInstanceReadReplica
    -> Maybe Int -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe Int
port :: Maybe Int
$sel:port:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Int
port} -> Maybe Int
port) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe Int
a -> CreateDBInstanceReadReplica
s {$sel:port:CreateDBInstanceReadReplica' :: Maybe Int
port = Maybe Int
a} :: CreateDBInstanceReadReplica)

-- | A value that indicates whether to enable mapping of Amazon Web Services
-- Identity and Access Management (IAM) accounts to database accounts. By
-- default, mapping is disabled.
--
-- For more information about IAM database authentication, 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./
createDBInstanceReadReplica_enableIAMDatabaseAuthentication :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe Prelude.Bool)
createDBInstanceReadReplica_enableIAMDatabaseAuthentication :: (Maybe Bool -> f (Maybe Bool))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_enableIAMDatabaseAuthentication = (CreateDBInstanceReadReplica -> Maybe Bool)
-> (CreateDBInstanceReadReplica
    -> Maybe Bool -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe Bool
enableIAMDatabaseAuthentication :: Maybe Bool
$sel:enableIAMDatabaseAuthentication:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Bool
enableIAMDatabaseAuthentication} -> Maybe Bool
enableIAMDatabaseAuthentication) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe Bool
a -> CreateDBInstanceReadReplica
s {$sel:enableIAMDatabaseAuthentication:CreateDBInstanceReadReplica' :: Maybe Bool
enableIAMDatabaseAuthentication = Maybe Bool
a} :: CreateDBInstanceReadReplica)

-- | A value that indicates whether the DB instance class of the DB instance
-- uses its default processor features.
createDBInstanceReadReplica_useDefaultProcessorFeatures :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe Prelude.Bool)
createDBInstanceReadReplica_useDefaultProcessorFeatures :: (Maybe Bool -> f (Maybe Bool))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_useDefaultProcessorFeatures = (CreateDBInstanceReadReplica -> Maybe Bool)
-> (CreateDBInstanceReadReplica
    -> Maybe Bool -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe Bool
useDefaultProcessorFeatures :: Maybe Bool
$sel:useDefaultProcessorFeatures:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Bool
useDefaultProcessorFeatures} -> Maybe Bool
useDefaultProcessorFeatures) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe Bool
a -> CreateDBInstanceReadReplica
s {$sel:useDefaultProcessorFeatures:CreateDBInstanceReadReplica' :: Maybe Bool
useDefaultProcessorFeatures = Maybe Bool
a} :: CreateDBInstanceReadReplica)

-- | Specifies the storage type to be associated with the read replica.
--
-- 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@
createDBInstanceReadReplica_storageType :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe Prelude.Text)
createDBInstanceReadReplica_storageType :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_storageType = (CreateDBInstanceReadReplica -> Maybe Text)
-> (CreateDBInstanceReadReplica
    -> Maybe Text -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe Text
storageType :: Maybe Text
$sel:storageType:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Text
storageType} -> Maybe Text
storageType) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe Text
a -> CreateDBInstanceReadReplica
s {$sel:storageType:CreateDBInstanceReadReplica' :: Maybe Text
storageType = Maybe Text
a} :: CreateDBInstanceReadReplica)

-- | The list of logs that the new DB instance is to export 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 RDS User Guide/.
createDBInstanceReadReplica_enableCloudwatchLogsExports :: Lens.Lens' CreateDBInstanceReadReplica (Prelude.Maybe [Prelude.Text])
createDBInstanceReadReplica_enableCloudwatchLogsExports :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_enableCloudwatchLogsExports = (CreateDBInstanceReadReplica -> Maybe [Text])
-> (CreateDBInstanceReadReplica
    -> Maybe [Text] -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica
     CreateDBInstanceReadReplica
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Maybe [Text]
enableCloudwatchLogsExports :: Maybe [Text]
$sel:enableCloudwatchLogsExports:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe [Text]
enableCloudwatchLogsExports} -> Maybe [Text]
enableCloudwatchLogsExports) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Maybe [Text]
a -> CreateDBInstanceReadReplica
s {$sel:enableCloudwatchLogsExports:CreateDBInstanceReadReplica' :: Maybe [Text]
enableCloudwatchLogsExports = Maybe [Text]
a} :: CreateDBInstanceReadReplica) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateDBInstanceReadReplica
-> f CreateDBInstanceReadReplica
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The DB instance identifier of the read replica. This identifier is the
-- unique key that identifies a DB instance. This parameter is stored as a
-- lowercase string.
createDBInstanceReadReplica_dbInstanceIdentifier :: Lens.Lens' CreateDBInstanceReadReplica Prelude.Text
createDBInstanceReadReplica_dbInstanceIdentifier :: (Text -> f Text)
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_dbInstanceIdentifier = (CreateDBInstanceReadReplica -> Text)
-> (CreateDBInstanceReadReplica
    -> Text -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica CreateDBInstanceReadReplica Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Text
dbInstanceIdentifier :: Text
$sel:dbInstanceIdentifier:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Text
dbInstanceIdentifier} -> Text
dbInstanceIdentifier) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Text
a -> CreateDBInstanceReadReplica
s {$sel:dbInstanceIdentifier:CreateDBInstanceReadReplica' :: Text
dbInstanceIdentifier = Text
a} :: CreateDBInstanceReadReplica)

-- | The identifier of the DB instance that will act as the source for the
-- read replica. Each DB instance can have up to five read replicas.
--
-- Constraints:
--
-- -   Must be the identifier of an existing MySQL, MariaDB, Oracle,
--     PostgreSQL, or SQL Server DB instance.
--
-- -   Can specify a DB instance that is a MySQL read replica only if the
--     source is running MySQL 5.6 or later.
--
-- -   For the limitations of Oracle read replicas, see
--     <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-read-replicas.html Read Replica Limitations with Oracle>
--     in the /Amazon RDS User Guide/.
--
-- -   For the limitations of SQL Server read replicas, see
--     <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/SQLServer.ReadReplicas.Limitations.html Read Replica Limitations with Microsoft SQL Server>
--     in the /Amazon RDS User Guide/.
--
-- -   Can specify a PostgreSQL DB instance only if the source is running
--     PostgreSQL 9.3.5 or later (9.4.7 and higher for cross-region
--     replication).
--
-- -   The specified DB instance must have automatic backups enabled, that
--     is, its backup retention period must be greater than 0.
--
-- -   If the source DB instance is in the same Amazon Web Services Region
--     as the read replica, specify a valid DB instance identifier.
--
-- -   If the source DB instance is in a different Amazon Web Services
--     Region from the read replica, specify a valid DB instance ARN. For
--     more information, see
--     <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing Constructing an ARN for Amazon RDS>
--     in the /Amazon RDS User Guide/. This doesn\'t apply to SQL Server,
--     which doesn\'t support cross-region replicas.
createDBInstanceReadReplica_sourceDBInstanceIdentifier :: Lens.Lens' CreateDBInstanceReadReplica Prelude.Text
createDBInstanceReadReplica_sourceDBInstanceIdentifier :: (Text -> f Text)
-> CreateDBInstanceReadReplica -> f CreateDBInstanceReadReplica
createDBInstanceReadReplica_sourceDBInstanceIdentifier = (CreateDBInstanceReadReplica -> Text)
-> (CreateDBInstanceReadReplica
    -> Text -> CreateDBInstanceReadReplica)
-> Lens
     CreateDBInstanceReadReplica CreateDBInstanceReadReplica Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceReadReplica' {Text
sourceDBInstanceIdentifier :: Text
$sel:sourceDBInstanceIdentifier:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Text
sourceDBInstanceIdentifier} -> Text
sourceDBInstanceIdentifier) (\s :: CreateDBInstanceReadReplica
s@CreateDBInstanceReadReplica' {} Text
a -> CreateDBInstanceReadReplica
s {$sel:sourceDBInstanceIdentifier:CreateDBInstanceReadReplica' :: Text
sourceDBInstanceIdentifier = Text
a} :: CreateDBInstanceReadReplica)

instance Core.AWSRequest CreateDBInstanceReadReplica where
  type
    AWSResponse CreateDBInstanceReadReplica =
      CreateDBInstanceReadReplicaResponse
  request :: CreateDBInstanceReadReplica -> Request CreateDBInstanceReadReplica
request = Service
-> CreateDBInstanceReadReplica
-> Request CreateDBInstanceReadReplica
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateDBInstanceReadReplica
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateDBInstanceReadReplica)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse CreateDBInstanceReadReplica))
-> Logger
-> Service
-> Proxy CreateDBInstanceReadReplica
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateDBInstanceReadReplica)))
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
"CreateDBInstanceReadReplicaResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe DBInstance -> Int -> CreateDBInstanceReadReplicaResponse
CreateDBInstanceReadReplicaResponse'
            (Maybe DBInstance -> Int -> CreateDBInstanceReadReplicaResponse)
-> Either String (Maybe DBInstance)
-> Either String (Int -> CreateDBInstanceReadReplicaResponse)
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 -> CreateDBInstanceReadReplicaResponse)
-> Either String Int
-> Either String CreateDBInstanceReadReplicaResponse
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 CreateDBInstanceReadReplica

instance Prelude.NFData CreateDBInstanceReadReplica

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

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

instance Core.ToQuery CreateDBInstanceReadReplica where
  toQuery :: CreateDBInstanceReadReplica -> QueryString
toQuery CreateDBInstanceReadReplica' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [ProcessorFeature]
Maybe [Tag]
Maybe Text
Maybe ReplicaMode
Text
sourceDBInstanceIdentifier :: Text
dbInstanceIdentifier :: Text
enableCloudwatchLogsExports :: Maybe [Text]
storageType :: Maybe Text
useDefaultProcessorFeatures :: Maybe Bool
enableIAMDatabaseAuthentication :: Maybe Bool
port :: Maybe Int
tags :: Maybe [Tag]
domainIAMRoleName :: Maybe Text
copyTagsToSnapshot :: Maybe Bool
optionGroupName :: Maybe Text
multiAZ :: Maybe Bool
vpcSecurityGroupIds :: Maybe [Text]
performanceInsightsKMSKeyId :: Maybe Text
availabilityZone :: Maybe Text
dbParameterGroupName :: Maybe Text
kmsKeyId :: Maybe Text
enablePerformanceInsights :: Maybe Bool
maxAllocatedStorage :: Maybe Int
destinationRegion :: Maybe Text
performanceInsightsRetentionPeriod :: Maybe Int
dbInstanceClass :: Maybe Text
processorFeatures :: Maybe [ProcessorFeature]
preSignedUrl :: Maybe Text
monitoringInterval :: Maybe Int
replicaMode :: Maybe ReplicaMode
domain :: Maybe Text
iops :: Maybe Int
monitoringRoleArn :: Maybe Text
dbSubnetGroupName :: Maybe Text
autoMinorVersionUpgrade :: Maybe Bool
publiclyAccessible :: Maybe Bool
deletionProtection :: Maybe Bool
$sel:sourceDBInstanceIdentifier:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Text
$sel:dbInstanceIdentifier:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Text
$sel:enableCloudwatchLogsExports:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe [Text]
$sel:storageType:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Text
$sel:useDefaultProcessorFeatures:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Bool
$sel:enableIAMDatabaseAuthentication:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Bool
$sel:port:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Int
$sel:tags:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe [Tag]
$sel:domainIAMRoleName:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Text
$sel:copyTagsToSnapshot:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Bool
$sel:optionGroupName:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Text
$sel:multiAZ:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Bool
$sel:vpcSecurityGroupIds:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe [Text]
$sel:performanceInsightsKMSKeyId:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Text
$sel:availabilityZone:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Text
$sel:dbParameterGroupName:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Text
$sel:kmsKeyId:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Text
$sel:enablePerformanceInsights:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Bool
$sel:maxAllocatedStorage:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Int
$sel:destinationRegion:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Text
$sel:performanceInsightsRetentionPeriod:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Int
$sel:dbInstanceClass:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Text
$sel:processorFeatures:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe [ProcessorFeature]
$sel:preSignedUrl:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Text
$sel:monitoringInterval:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Int
$sel:replicaMode:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe ReplicaMode
$sel:domain:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Text
$sel:iops:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Int
$sel:monitoringRoleArn:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Text
$sel:dbSubnetGroupName:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Text
$sel:autoMinorVersionUpgrade:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Bool
$sel:publiclyAccessible:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Bool
$sel:deletionProtection:CreateDBInstanceReadReplica' :: CreateDBInstanceReadReplica -> Maybe Bool
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"CreateDBInstanceReadReplica" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"DeletionProtection" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
deletionProtection,
        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
"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
"ReplicaMode" ByteString -> Maybe ReplicaMode -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ReplicaMode
replicaMode,
        ByteString
"MonitoringInterval" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
monitoringInterval,
        ByteString
"PreSignedUrl" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
preSignedUrl,
        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
"DBInstanceClass" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
dbInstanceClass,
        ByteString
"PerformanceInsightsRetentionPeriod"
          ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
performanceInsightsRetentionPeriod,
        ByteString
"DestinationRegion" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
destinationRegion,
        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
"AvailabilityZone" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
availabilityZone,
        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
"OptionGroupName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
optionGroupName,
        ByteString
"CopyTagsToSnapshot" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
copyTagsToSnapshot,
        ByteString
"DomainIAMRoleName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
domainIAMRoleName,
        ByteString
"Tags"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [Tag] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"Tag" ([Tag] -> QueryString) -> Maybe [Tag] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
        ByteString
"Port" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
port,
        ByteString
"EnableIAMDatabaseAuthentication"
          ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
enableIAMDatabaseAuthentication,
        ByteString
"UseDefaultProcessorFeatures"
          ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
useDefaultProcessorFeatures,
        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
"DBInstanceIdentifier" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbInstanceIdentifier,
        ByteString
"SourceDBInstanceIdentifier"
          ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
sourceDBInstanceIdentifier
      ]

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

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

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

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

instance
  Prelude.NFData
    CreateDBInstanceReadReplicaResponse