{-# 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.ElastiCache.CreateReplicationGroup
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a Redis (cluster mode disabled) or a Redis (cluster mode
-- enabled) replication group.
--
-- This API can be used to create a standalone regional replication group
-- or a secondary replication group associated with a Global datastore.
--
-- A Redis (cluster mode disabled) replication group is a collection of
-- clusters, where one of the clusters is a read\/write primary and the
-- others are read-only replicas. Writes to the primary are asynchronously
-- propagated to the replicas.
--
-- A Redis cluster-mode enabled cluster is comprised of from 1 to 90 shards
-- (API\/CLI: node groups). Each shard has a primary node and up to 5
-- read-only replica nodes. The configuration can range from 90 shards and
-- 0 replicas to 15 shards and 5 replicas, which is the maximum number or
-- replicas allowed.
--
-- The node or shard limit can be increased to a maximum of 500 per cluster
-- if the Redis engine version is 5.0.6 or higher. For example, you can
-- choose to configure a 500 node cluster that ranges between 83 shards
-- (one primary and 5 replicas per shard) and 500 shards (single primary
-- and no replicas). Make sure there are enough available IP addresses to
-- accommodate the increase. Common pitfalls include the subnets in the
-- subnet group have too small a CIDR range or the subnets are shared and
-- heavily used by other clusters. For more information, see
-- <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SubnetGroups.Creating.html Creating a Subnet Group>.
-- For versions below 5.0.6, the limit is 250 per cluster.
--
-- To request a limit increase, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html Amazon Service Limits>
-- and choose the limit type __Nodes per cluster per instance type__.
--
-- When a Redis (cluster mode disabled) replication group has been
-- successfully created, you can add one or more read replicas to it, up to
-- a total of 5 read replicas. If you need to increase or decrease the
-- number of node groups (console: shards), you can avail yourself of
-- ElastiCache for Redis\' scaling. For more information, see
-- <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Scaling.html Scaling ElastiCache for Redis Clusters>
-- in the /ElastiCache User Guide/.
--
-- This operation is valid for Redis only.
module Amazonka.ElastiCache.CreateReplicationGroup
  ( -- * Creating a Request
    CreateReplicationGroup (..),
    newCreateReplicationGroup,

    -- * Request Lenses
    createReplicationGroup_atRestEncryptionEnabled,
    createReplicationGroup_authToken,
    createReplicationGroup_autoMinorVersionUpgrade,
    createReplicationGroup_automaticFailoverEnabled,
    createReplicationGroup_cacheNodeType,
    createReplicationGroup_cacheParameterGroupName,
    createReplicationGroup_cacheSecurityGroupNames,
    createReplicationGroup_cacheSubnetGroupName,
    createReplicationGroup_dataTieringEnabled,
    createReplicationGroup_engine,
    createReplicationGroup_engineVersion,
    createReplicationGroup_globalReplicationGroupId,
    createReplicationGroup_ipDiscovery,
    createReplicationGroup_kmsKeyId,
    createReplicationGroup_logDeliveryConfigurations,
    createReplicationGroup_multiAZEnabled,
    createReplicationGroup_networkType,
    createReplicationGroup_nodeGroupConfiguration,
    createReplicationGroup_notificationTopicArn,
    createReplicationGroup_numCacheClusters,
    createReplicationGroup_numNodeGroups,
    createReplicationGroup_port,
    createReplicationGroup_preferredCacheClusterAZs,
    createReplicationGroup_preferredMaintenanceWindow,
    createReplicationGroup_primaryClusterId,
    createReplicationGroup_replicasPerNodeGroup,
    createReplicationGroup_securityGroupIds,
    createReplicationGroup_snapshotArns,
    createReplicationGroup_snapshotName,
    createReplicationGroup_snapshotRetentionLimit,
    createReplicationGroup_snapshotWindow,
    createReplicationGroup_tags,
    createReplicationGroup_transitEncryptionEnabled,
    createReplicationGroup_transitEncryptionMode,
    createReplicationGroup_userGroupIds,
    createReplicationGroup_replicationGroupId,
    createReplicationGroup_replicationGroupDescription,

    -- * Destructuring the Response
    CreateReplicationGroupResponse (..),
    newCreateReplicationGroupResponse,

    -- * Response Lenses
    createReplicationGroupResponse_replicationGroup,
    createReplicationGroupResponse_httpStatus,
  )
where

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

-- | Represents the input of a @CreateReplicationGroup@ operation.
--
-- /See:/ 'newCreateReplicationGroup' smart constructor.
data CreateReplicationGroup = CreateReplicationGroup'
  { -- | A flag that enables encryption at rest when set to @true@.
    --
    -- You cannot modify the value of @AtRestEncryptionEnabled@ after the
    -- replication group is created. To enable encryption at rest on a
    -- replication group you must set @AtRestEncryptionEnabled@ to @true@ when
    -- you create the replication group.
    --
    -- __Required:__ Only available when creating a replication group in an
    -- Amazon VPC using redis version @3.2.6@, @4.x@ or later.
    --
    -- Default: @false@
    CreateReplicationGroup -> Maybe Bool
atRestEncryptionEnabled :: Prelude.Maybe Prelude.Bool,
    -- | __Reserved parameter.__ The password used to access a password protected
    -- server.
    --
    -- @AuthToken@ can be specified only on replication groups where
    -- @TransitEncryptionEnabled@ is @true@.
    --
    -- For HIPAA compliance, you must specify @TransitEncryptionEnabled@ as
    -- @true@, an @AuthToken@, and a @CacheSubnetGroup@.
    --
    -- Password constraints:
    --
    -- -   Must be only printable ASCII characters.
    --
    -- -   Must be at least 16 characters and no more than 128 characters in
    --     length.
    --
    -- -   The only permitted printable special characters are !, &, #, $, ^,
    --     \<, >, and -. Other printable special characters cannot be used in
    --     the AUTH token.
    --
    -- For more information, see <http://redis.io/commands/AUTH AUTH password>
    -- at http:\/\/redis.io\/commands\/AUTH.
    CreateReplicationGroup -> Maybe Text
authToken :: Prelude.Maybe Prelude.Text,
    -- | If you are running Redis engine version 6.0 or later, set this
    -- parameter to yes if you want to opt-in to the next auto minor version
    -- upgrade campaign. This parameter is disabled for previous versions.
    CreateReplicationGroup -> Maybe Bool
autoMinorVersionUpgrade :: Prelude.Maybe Prelude.Bool,
    -- | Specifies whether a read-only replica is automatically promoted to
    -- read\/write primary if the existing primary fails.
    --
    -- @AutomaticFailoverEnabled@ must be enabled for Redis (cluster mode
    -- enabled) replication groups.
    --
    -- Default: false
    CreateReplicationGroup -> Maybe Bool
automaticFailoverEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The compute and memory capacity of the nodes in the node group (shard).
    --
    -- The following node types are supported by ElastiCache. Generally
    -- speaking, the current generation types provide more memory and
    -- computational power at lower cost when compared to their equivalent
    -- previous generation counterparts.
    --
    -- -   General purpose:
    --
    --     -   Current generation:
    --
    --         __M6g node types__ (available only for Redis engine version
    --         5.0.6 onward and for Memcached engine version 1.5.16 onward):
    --         @cache.m6g.large@, @cache.m6g.xlarge@, @cache.m6g.2xlarge@,
    --         @cache.m6g.4xlarge@, @cache.m6g.8xlarge@, @cache.m6g.12xlarge@,
    --         @cache.m6g.16xlarge@
    --
    --         For region availability, see
    --         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
    --
    --         __M5 node types:__ @cache.m5.large@, @cache.m5.xlarge@,
    --         @cache.m5.2xlarge@, @cache.m5.4xlarge@, @cache.m5.12xlarge@,
    --         @cache.m5.24xlarge@
    --
    --         __M4 node types:__ @cache.m4.large@, @cache.m4.xlarge@,
    --         @cache.m4.2xlarge@, @cache.m4.4xlarge@, @cache.m4.10xlarge@
    --
    --         __T4g node types__ (available only for Redis engine version
    --         5.0.6 onward and Memcached engine version 1.5.16 onward):
    --         @cache.t4g.micro@, @cache.t4g.small@, @cache.t4g.medium@
    --
    --         __T3 node types:__ @cache.t3.micro@, @cache.t3.small@,
    --         @cache.t3.medium@
    --
    --         __T2 node types:__ @cache.t2.micro@, @cache.t2.small@,
    --         @cache.t2.medium@
    --
    --     -   Previous generation: (not recommended. Existing clusters are
    --         still supported but creation of new clusters is not supported
    --         for these types.)
    --
    --         __T1 node types:__ @cache.t1.micro@
    --
    --         __M1 node types:__ @cache.m1.small@, @cache.m1.medium@,
    --         @cache.m1.large@, @cache.m1.xlarge@
    --
    --         __M3 node types:__ @cache.m3.medium@, @cache.m3.large@,
    --         @cache.m3.xlarge@, @cache.m3.2xlarge@
    --
    -- -   Compute optimized:
    --
    --     -   Previous generation: (not recommended. Existing clusters are
    --         still supported but creation of new clusters is not supported
    --         for these types.)
    --
    --         __C1 node types:__ @cache.c1.xlarge@
    --
    -- -   Memory optimized:
    --
    --     -   Current generation:
    --
    --         __R6g node types__ (available only for Redis engine version
    --         5.0.6 onward and for Memcached engine version 1.5.16 onward).
    --
    --         @cache.r6g.large@, @cache.r6g.xlarge@, @cache.r6g.2xlarge@,
    --         @cache.r6g.4xlarge@, @cache.r6g.8xlarge@, @cache.r6g.12xlarge@,
    --         @cache.r6g.16xlarge@
    --
    --         For region availability, see
    --         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
    --
    --         __R5 node types:__ @cache.r5.large@, @cache.r5.xlarge@,
    --         @cache.r5.2xlarge@, @cache.r5.4xlarge@, @cache.r5.12xlarge@,
    --         @cache.r5.24xlarge@
    --
    --         __R4 node types:__ @cache.r4.large@, @cache.r4.xlarge@,
    --         @cache.r4.2xlarge@, @cache.r4.4xlarge@, @cache.r4.8xlarge@,
    --         @cache.r4.16xlarge@
    --
    --     -   Previous generation: (not recommended. Existing clusters are
    --         still supported but creation of new clusters is not supported
    --         for these types.)
    --
    --         __M2 node types:__ @cache.m2.xlarge@, @cache.m2.2xlarge@,
    --         @cache.m2.4xlarge@
    --
    --         __R3 node types:__ @cache.r3.large@, @cache.r3.xlarge@,
    --         @cache.r3.2xlarge@, @cache.r3.4xlarge@, @cache.r3.8xlarge@
    --
    -- __Additional node type info__
    --
    -- -   All current generation instance types are created in Amazon VPC by
    --     default.
    --
    -- -   Redis append-only files (AOF) are not supported for T1 or T2
    --     instances.
    --
    -- -   Redis Multi-AZ with automatic failover is not supported on T1
    --     instances.
    --
    -- -   Redis configuration variables @appendonly@ and @appendfsync@ are not
    --     supported on Redis version 2.8.22 and later.
    CreateReplicationGroup -> Maybe Text
cacheNodeType :: Prelude.Maybe Prelude.Text,
    -- | The name of the parameter group to associate with this replication
    -- group. If this argument is omitted, the default cache parameter group
    -- for the specified engine is used.
    --
    -- If you are running Redis version 3.2.4 or later, only one node group
    -- (shard), and want to use a default parameter group, we recommend that
    -- you specify the parameter group by name.
    --
    -- -   To create a Redis (cluster mode disabled) replication group, use
    --     @CacheParameterGroupName=default.redis3.2@.
    --
    -- -   To create a Redis (cluster mode enabled) replication group, use
    --     @CacheParameterGroupName=default.redis3.2.cluster.on@.
    CreateReplicationGroup -> Maybe Text
cacheParameterGroupName :: Prelude.Maybe Prelude.Text,
    -- | A list of cache security group names to associate with this replication
    -- group.
    CreateReplicationGroup -> Maybe [Text]
cacheSecurityGroupNames :: Prelude.Maybe [Prelude.Text],
    -- | The name of the cache subnet group to be used for the replication group.
    --
    -- If you\'re going to launch your cluster in an Amazon VPC, you need to
    -- create a subnet group before you start creating a cluster. For more
    -- information, see
    -- <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SubnetGroups.html Subnets and Subnet Groups>.
    CreateReplicationGroup -> Maybe Text
cacheSubnetGroupName :: Prelude.Maybe Prelude.Text,
    -- | Enables data tiering. Data tiering is only supported for replication
    -- groups using the r6gd node type. This parameter must be set to true when
    -- using r6gd nodes. For more information, see
    -- <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/data-tiering.html Data tiering>.
    CreateReplicationGroup -> Maybe Bool
dataTieringEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The name of the cache engine to be used for the clusters in this
    -- replication group. The value must be set to @Redis@.
    CreateReplicationGroup -> Maybe Text
engine :: Prelude.Maybe Prelude.Text,
    -- | The version number of the cache engine to be used for the clusters in
    -- this replication group. To view the supported cache engine versions, use
    -- the @DescribeCacheEngineVersions@ operation.
    --
    -- __Important:__ You can upgrade to a newer engine version (see
    -- <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement Selecting a Cache Engine and Version>)
    -- in the /ElastiCache User Guide/, but you cannot downgrade to an earlier
    -- engine version. If you want to use an earlier engine version, you must
    -- delete the existing cluster or replication group and create it anew with
    -- the earlier engine version.
    CreateReplicationGroup -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
    -- | The name of the Global datastore
    CreateReplicationGroup -> Maybe Text
globalReplicationGroupId :: Prelude.Maybe Prelude.Text,
    -- | The network type you choose when creating a replication group, either
    -- @ipv4@ | @ipv6@. IPv6 is supported for workloads using Redis engine
    -- version 6.2 onward or Memcached engine version 1.6.6 on all instances
    -- built on the <https://aws.amazon.com/ec2/nitro/ Nitro system>.
    CreateReplicationGroup -> Maybe IpDiscovery
ipDiscovery :: Prelude.Maybe IpDiscovery,
    -- | The ID of the KMS key used to encrypt the disk in the cluster.
    CreateReplicationGroup -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | Specifies the destination, format and type of the logs.
    CreateReplicationGroup -> Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations :: Prelude.Maybe [LogDeliveryConfigurationRequest],
    -- | A flag indicating if you have Multi-AZ enabled to enhance fault
    -- tolerance. For more information, see
    -- <http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/AutoFailover.html Minimizing Downtime: Multi-AZ>.
    CreateReplicationGroup -> Maybe Bool
multiAZEnabled :: Prelude.Maybe Prelude.Bool,
    -- | Must be either @ipv4@ | @ipv6@ | @dual_stack@. IPv6 is supported for
    -- workloads using Redis engine version 6.2 onward or Memcached engine
    -- version 1.6.6 on all instances built on the
    -- <https://aws.amazon.com/ec2/nitro/ Nitro system>.
    CreateReplicationGroup -> Maybe NetworkType
networkType :: Prelude.Maybe NetworkType,
    -- | A list of node group (shard) configuration options. Each node group
    -- (shard) configuration has the following members:
    -- @PrimaryAvailabilityZone@, @ReplicaAvailabilityZones@, @ReplicaCount@,
    -- and @Slots@.
    --
    -- If you\'re creating a Redis (cluster mode disabled) or a Redis (cluster
    -- mode enabled) replication group, you can use this parameter to
    -- individually configure each node group (shard), or you can omit this
    -- parameter. However, it is required when seeding a Redis (cluster mode
    -- enabled) cluster from a S3 rdb file. You must configure each node group
    -- (shard) using this parameter because you must specify the slots for each
    -- node group.
    CreateReplicationGroup -> Maybe [NodeGroupConfiguration]
nodeGroupConfiguration :: Prelude.Maybe [NodeGroupConfiguration],
    -- | The Amazon Resource Name (ARN) of the Amazon Simple Notification Service
    -- (SNS) topic to which notifications are sent.
    --
    -- The Amazon SNS topic owner must be the same as the cluster owner.
    CreateReplicationGroup -> Maybe Text
notificationTopicArn :: Prelude.Maybe Prelude.Text,
    -- | The number of clusters this replication group initially has.
    --
    -- This parameter is not used if there is more than one node group (shard).
    -- You should use @ReplicasPerNodeGroup@ instead.
    --
    -- If @AutomaticFailoverEnabled@ is @true@, the value of this parameter
    -- must be at least 2. If @AutomaticFailoverEnabled@ is @false@ you can
    -- omit this parameter (it will default to 1), or you can explicitly set it
    -- to a value between 2 and 6.
    --
    -- The maximum permitted value for @NumCacheClusters@ is 6 (1 primary plus
    -- 5 replicas).
    CreateReplicationGroup -> Maybe Int
numCacheClusters :: Prelude.Maybe Prelude.Int,
    -- | An optional parameter that specifies the number of node groups (shards)
    -- for this Redis (cluster mode enabled) replication group. For Redis
    -- (cluster mode disabled) either omit this parameter or set it to 1.
    --
    -- Default: 1
    CreateReplicationGroup -> Maybe Int
numNodeGroups :: Prelude.Maybe Prelude.Int,
    -- | The port number on which each member of the replication group accepts
    -- connections.
    CreateReplicationGroup -> Maybe Int
port :: Prelude.Maybe Prelude.Int,
    -- | A list of EC2 Availability Zones in which the replication group\'s
    -- clusters are created. The order of the Availability Zones in the list is
    -- the order in which clusters are allocated. The primary cluster is
    -- created in the first AZ in the list.
    --
    -- This parameter is not used if there is more than one node group (shard).
    -- You should use @NodeGroupConfiguration@ instead.
    --
    -- If you are creating your replication group in an Amazon VPC
    -- (recommended), you can only locate clusters in Availability Zones
    -- associated with the subnets in the selected subnet group.
    --
    -- The number of Availability Zones listed must equal the value of
    -- @NumCacheClusters@.
    --
    -- Default: system chosen Availability Zones.
    CreateReplicationGroup -> Maybe [Text]
preferredCacheClusterAZs :: Prelude.Maybe [Prelude.Text],
    -- | Specifies the weekly time range during which maintenance on the cluster
    -- is performed. It is specified as a range in the format
    -- ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window
    -- is a 60 minute period. Valid values for @ddd@ are:
    --
    -- Specifies the weekly time range during which maintenance on the cluster
    -- is performed. It is specified as a range in the format
    -- ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window
    -- is a 60 minute period.
    --
    -- Valid values for @ddd@ are:
    --
    -- -   @sun@
    --
    -- -   @mon@
    --
    -- -   @tue@
    --
    -- -   @wed@
    --
    -- -   @thu@
    --
    -- -   @fri@
    --
    -- -   @sat@
    --
    -- Example: @sun:23:00-mon:01:30@
    CreateReplicationGroup -> Maybe Text
preferredMaintenanceWindow :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the cluster that serves as the primary for this
    -- replication group. This cluster must already exist and have a status of
    -- @available@.
    --
    -- This parameter is not required if @NumCacheClusters@, @NumNodeGroups@,
    -- or @ReplicasPerNodeGroup@ is specified.
    CreateReplicationGroup -> Maybe Text
primaryClusterId :: Prelude.Maybe Prelude.Text,
    -- | An optional parameter that specifies the number of replica nodes in each
    -- node group (shard). Valid values are 0 to 5.
    CreateReplicationGroup -> Maybe Int
replicasPerNodeGroup :: Prelude.Maybe Prelude.Int,
    -- | One or more Amazon VPC security groups associated with this replication
    -- group.
    --
    -- Use this parameter only when you are creating a replication group in an
    -- Amazon Virtual Private Cloud (Amazon VPC).
    CreateReplicationGroup -> Maybe [Text]
securityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | A list of Amazon Resource Names (ARN) that uniquely identify the Redis
    -- RDB snapshot files stored in Amazon S3. The snapshot files are used to
    -- populate the new replication group. The Amazon S3 object name in the ARN
    -- cannot contain any commas. The new replication group will have the
    -- number of node groups (console: shards) specified by the parameter
    -- /NumNodeGroups/ or the number of node groups configured by
    -- /NodeGroupConfiguration/ regardless of the number of ARNs specified
    -- here.
    --
    -- Example of an Amazon S3 ARN: @arn:aws:s3:::my_bucket\/snapshot1.rdb@
    CreateReplicationGroup -> Maybe [Text]
snapshotArns :: Prelude.Maybe [Prelude.Text],
    -- | The name of a snapshot from which to restore data into the new
    -- replication group. The snapshot status changes to @restoring@ while the
    -- new replication group is being created.
    CreateReplicationGroup -> Maybe Text
snapshotName :: Prelude.Maybe Prelude.Text,
    -- | The number of days for which ElastiCache retains automatic snapshots
    -- before deleting them. For example, if you set @SnapshotRetentionLimit@
    -- to 5, a snapshot that was taken today is retained for 5 days before
    -- being deleted.
    --
    -- Default: 0 (i.e., automatic backups are disabled for this cluster).
    CreateReplicationGroup -> Maybe Int
snapshotRetentionLimit :: Prelude.Maybe Prelude.Int,
    -- | The daily time range (in UTC) during which ElastiCache begins taking a
    -- daily snapshot of your node group (shard).
    --
    -- Example: @05:00-09:00@
    --
    -- If you do not specify this parameter, ElastiCache automatically chooses
    -- an appropriate time range.
    CreateReplicationGroup -> Maybe Text
snapshotWindow :: Prelude.Maybe Prelude.Text,
    -- | A list of tags to be added to this resource. Tags are comma-separated
    -- key,value pairs (e.g. Key=@myKey@, Value=@myKeyValue@. You can include
    -- multiple tags as shown following: Key=@myKey@, Value=@myKeyValue@
    -- Key=@mySecondKey@, Value=@mySecondKeyValue@. Tags on replication groups
    -- will be replicated to all nodes.
    CreateReplicationGroup -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | A flag that enables in-transit encryption when set to @true@.
    --
    -- This parameter is valid only if the @Engine@ parameter is @redis@, the
    -- @EngineVersion@ parameter is @3.2.6@, @4.x@ or later, and the cluster is
    -- being created in an Amazon VPC.
    --
    -- If you enable in-transit encryption, you must also specify a value for
    -- @CacheSubnetGroup@.
    --
    -- __Required:__ Only available when creating a replication group in an
    -- Amazon VPC using redis version @3.2.6@, @4.x@ or later.
    --
    -- Default: @false@
    --
    -- For HIPAA compliance, you must specify @TransitEncryptionEnabled@ as
    -- @true@, an @AuthToken@, and a @CacheSubnetGroup@.
    CreateReplicationGroup -> Maybe Bool
transitEncryptionEnabled :: Prelude.Maybe Prelude.Bool,
    -- | A setting that allows you to migrate your clients to use in-transit
    -- encryption, with no downtime.
    --
    -- When setting @TransitEncryptionEnabled@ to @true@, you can set your
    -- @TransitEncryptionMode@ to @preferred@ in the same request, to allow
    -- both encrypted and unencrypted connections at the same time. Once you
    -- migrate all your Redis clients to use encrypted connections you can
    -- modify the value to @required@ to allow encrypted connections only.
    --
    -- Setting @TransitEncryptionMode@ to @required@ is a two-step process that
    -- requires you to first set the @TransitEncryptionMode@ to @preferred@
    -- first, after that you can set @TransitEncryptionMode@ to @required@.
    CreateReplicationGroup -> Maybe TransitEncryptionMode
transitEncryptionMode :: Prelude.Maybe TransitEncryptionMode,
    -- | The user group to associate with the replication group.
    CreateReplicationGroup -> Maybe (NonEmpty Text)
userGroupIds :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | The replication group identifier. This parameter is stored as a
    -- lowercase string.
    --
    -- Constraints:
    --
    -- -   A name must contain from 1 to 40 alphanumeric characters or hyphens.
    --
    -- -   The first character must be a letter.
    --
    -- -   A name cannot end with a hyphen or contain two consecutive hyphens.
    CreateReplicationGroup -> Text
replicationGroupId :: Prelude.Text,
    -- | A user-created description for the replication group.
    CreateReplicationGroup -> Text
replicationGroupDescription :: Prelude.Text
  }
  deriving (CreateReplicationGroup -> CreateReplicationGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateReplicationGroup -> CreateReplicationGroup -> Bool
$c/= :: CreateReplicationGroup -> CreateReplicationGroup -> Bool
== :: CreateReplicationGroup -> CreateReplicationGroup -> Bool
$c== :: CreateReplicationGroup -> CreateReplicationGroup -> Bool
Prelude.Eq, ReadPrec [CreateReplicationGroup]
ReadPrec CreateReplicationGroup
Int -> ReadS CreateReplicationGroup
ReadS [CreateReplicationGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateReplicationGroup]
$creadListPrec :: ReadPrec [CreateReplicationGroup]
readPrec :: ReadPrec CreateReplicationGroup
$creadPrec :: ReadPrec CreateReplicationGroup
readList :: ReadS [CreateReplicationGroup]
$creadList :: ReadS [CreateReplicationGroup]
readsPrec :: Int -> ReadS CreateReplicationGroup
$creadsPrec :: Int -> ReadS CreateReplicationGroup
Prelude.Read, Int -> CreateReplicationGroup -> ShowS
[CreateReplicationGroup] -> ShowS
CreateReplicationGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateReplicationGroup] -> ShowS
$cshowList :: [CreateReplicationGroup] -> ShowS
show :: CreateReplicationGroup -> String
$cshow :: CreateReplicationGroup -> String
showsPrec :: Int -> CreateReplicationGroup -> ShowS
$cshowsPrec :: Int -> CreateReplicationGroup -> ShowS
Prelude.Show, forall x. Rep CreateReplicationGroup x -> CreateReplicationGroup
forall x. CreateReplicationGroup -> Rep CreateReplicationGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateReplicationGroup x -> CreateReplicationGroup
$cfrom :: forall x. CreateReplicationGroup -> Rep CreateReplicationGroup x
Prelude.Generic)

-- |
-- Create a value of 'CreateReplicationGroup' 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:
--
-- 'atRestEncryptionEnabled', 'createReplicationGroup_atRestEncryptionEnabled' - A flag that enables encryption at rest when set to @true@.
--
-- You cannot modify the value of @AtRestEncryptionEnabled@ after the
-- replication group is created. To enable encryption at rest on a
-- replication group you must set @AtRestEncryptionEnabled@ to @true@ when
-- you create the replication group.
--
-- __Required:__ Only available when creating a replication group in an
-- Amazon VPC using redis version @3.2.6@, @4.x@ or later.
--
-- Default: @false@
--
-- 'authToken', 'createReplicationGroup_authToken' - __Reserved parameter.__ The password used to access a password protected
-- server.
--
-- @AuthToken@ can be specified only on replication groups where
-- @TransitEncryptionEnabled@ is @true@.
--
-- For HIPAA compliance, you must specify @TransitEncryptionEnabled@ as
-- @true@, an @AuthToken@, and a @CacheSubnetGroup@.
--
-- Password constraints:
--
-- -   Must be only printable ASCII characters.
--
-- -   Must be at least 16 characters and no more than 128 characters in
--     length.
--
-- -   The only permitted printable special characters are !, &, #, $, ^,
--     \<, >, and -. Other printable special characters cannot be used in
--     the AUTH token.
--
-- For more information, see <http://redis.io/commands/AUTH AUTH password>
-- at http:\/\/redis.io\/commands\/AUTH.
--
-- 'autoMinorVersionUpgrade', 'createReplicationGroup_autoMinorVersionUpgrade' - If you are running Redis engine version 6.0 or later, set this
-- parameter to yes if you want to opt-in to the next auto minor version
-- upgrade campaign. This parameter is disabled for previous versions.
--
-- 'automaticFailoverEnabled', 'createReplicationGroup_automaticFailoverEnabled' - Specifies whether a read-only replica is automatically promoted to
-- read\/write primary if the existing primary fails.
--
-- @AutomaticFailoverEnabled@ must be enabled for Redis (cluster mode
-- enabled) replication groups.
--
-- Default: false
--
-- 'cacheNodeType', 'createReplicationGroup_cacheNodeType' - The compute and memory capacity of the nodes in the node group (shard).
--
-- The following node types are supported by ElastiCache. Generally
-- speaking, the current generation types provide more memory and
-- computational power at lower cost when compared to their equivalent
-- previous generation counterparts.
--
-- -   General purpose:
--
--     -   Current generation:
--
--         __M6g node types__ (available only for Redis engine version
--         5.0.6 onward and for Memcached engine version 1.5.16 onward):
--         @cache.m6g.large@, @cache.m6g.xlarge@, @cache.m6g.2xlarge@,
--         @cache.m6g.4xlarge@, @cache.m6g.8xlarge@, @cache.m6g.12xlarge@,
--         @cache.m6g.16xlarge@
--
--         For region availability, see
--         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
--
--         __M5 node types:__ @cache.m5.large@, @cache.m5.xlarge@,
--         @cache.m5.2xlarge@, @cache.m5.4xlarge@, @cache.m5.12xlarge@,
--         @cache.m5.24xlarge@
--
--         __M4 node types:__ @cache.m4.large@, @cache.m4.xlarge@,
--         @cache.m4.2xlarge@, @cache.m4.4xlarge@, @cache.m4.10xlarge@
--
--         __T4g node types__ (available only for Redis engine version
--         5.0.6 onward and Memcached engine version 1.5.16 onward):
--         @cache.t4g.micro@, @cache.t4g.small@, @cache.t4g.medium@
--
--         __T3 node types:__ @cache.t3.micro@, @cache.t3.small@,
--         @cache.t3.medium@
--
--         __T2 node types:__ @cache.t2.micro@, @cache.t2.small@,
--         @cache.t2.medium@
--
--     -   Previous generation: (not recommended. Existing clusters are
--         still supported but creation of new clusters is not supported
--         for these types.)
--
--         __T1 node types:__ @cache.t1.micro@
--
--         __M1 node types:__ @cache.m1.small@, @cache.m1.medium@,
--         @cache.m1.large@, @cache.m1.xlarge@
--
--         __M3 node types:__ @cache.m3.medium@, @cache.m3.large@,
--         @cache.m3.xlarge@, @cache.m3.2xlarge@
--
-- -   Compute optimized:
--
--     -   Previous generation: (not recommended. Existing clusters are
--         still supported but creation of new clusters is not supported
--         for these types.)
--
--         __C1 node types:__ @cache.c1.xlarge@
--
-- -   Memory optimized:
--
--     -   Current generation:
--
--         __R6g node types__ (available only for Redis engine version
--         5.0.6 onward and for Memcached engine version 1.5.16 onward).
--
--         @cache.r6g.large@, @cache.r6g.xlarge@, @cache.r6g.2xlarge@,
--         @cache.r6g.4xlarge@, @cache.r6g.8xlarge@, @cache.r6g.12xlarge@,
--         @cache.r6g.16xlarge@
--
--         For region availability, see
--         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
--
--         __R5 node types:__ @cache.r5.large@, @cache.r5.xlarge@,
--         @cache.r5.2xlarge@, @cache.r5.4xlarge@, @cache.r5.12xlarge@,
--         @cache.r5.24xlarge@
--
--         __R4 node types:__ @cache.r4.large@, @cache.r4.xlarge@,
--         @cache.r4.2xlarge@, @cache.r4.4xlarge@, @cache.r4.8xlarge@,
--         @cache.r4.16xlarge@
--
--     -   Previous generation: (not recommended. Existing clusters are
--         still supported but creation of new clusters is not supported
--         for these types.)
--
--         __M2 node types:__ @cache.m2.xlarge@, @cache.m2.2xlarge@,
--         @cache.m2.4xlarge@
--
--         __R3 node types:__ @cache.r3.large@, @cache.r3.xlarge@,
--         @cache.r3.2xlarge@, @cache.r3.4xlarge@, @cache.r3.8xlarge@
--
-- __Additional node type info__
--
-- -   All current generation instance types are created in Amazon VPC by
--     default.
--
-- -   Redis append-only files (AOF) are not supported for T1 or T2
--     instances.
--
-- -   Redis Multi-AZ with automatic failover is not supported on T1
--     instances.
--
-- -   Redis configuration variables @appendonly@ and @appendfsync@ are not
--     supported on Redis version 2.8.22 and later.
--
-- 'cacheParameterGroupName', 'createReplicationGroup_cacheParameterGroupName' - The name of the parameter group to associate with this replication
-- group. If this argument is omitted, the default cache parameter group
-- for the specified engine is used.
--
-- If you are running Redis version 3.2.4 or later, only one node group
-- (shard), and want to use a default parameter group, we recommend that
-- you specify the parameter group by name.
--
-- -   To create a Redis (cluster mode disabled) replication group, use
--     @CacheParameterGroupName=default.redis3.2@.
--
-- -   To create a Redis (cluster mode enabled) replication group, use
--     @CacheParameterGroupName=default.redis3.2.cluster.on@.
--
-- 'cacheSecurityGroupNames', 'createReplicationGroup_cacheSecurityGroupNames' - A list of cache security group names to associate with this replication
-- group.
--
-- 'cacheSubnetGroupName', 'createReplicationGroup_cacheSubnetGroupName' - The name of the cache subnet group to be used for the replication group.
--
-- If you\'re going to launch your cluster in an Amazon VPC, you need to
-- create a subnet group before you start creating a cluster. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SubnetGroups.html Subnets and Subnet Groups>.
--
-- 'dataTieringEnabled', 'createReplicationGroup_dataTieringEnabled' - Enables data tiering. Data tiering is only supported for replication
-- groups using the r6gd node type. This parameter must be set to true when
-- using r6gd nodes. For more information, see
-- <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/data-tiering.html Data tiering>.
--
-- 'engine', 'createReplicationGroup_engine' - The name of the cache engine to be used for the clusters in this
-- replication group. The value must be set to @Redis@.
--
-- 'engineVersion', 'createReplicationGroup_engineVersion' - The version number of the cache engine to be used for the clusters in
-- this replication group. To view the supported cache engine versions, use
-- the @DescribeCacheEngineVersions@ operation.
--
-- __Important:__ You can upgrade to a newer engine version (see
-- <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement Selecting a Cache Engine and Version>)
-- in the /ElastiCache User Guide/, but you cannot downgrade to an earlier
-- engine version. If you want to use an earlier engine version, you must
-- delete the existing cluster or replication group and create it anew with
-- the earlier engine version.
--
-- 'globalReplicationGroupId', 'createReplicationGroup_globalReplicationGroupId' - The name of the Global datastore
--
-- 'ipDiscovery', 'createReplicationGroup_ipDiscovery' - The network type you choose when creating a replication group, either
-- @ipv4@ | @ipv6@. IPv6 is supported for workloads using Redis engine
-- version 6.2 onward or Memcached engine version 1.6.6 on all instances
-- built on the <https://aws.amazon.com/ec2/nitro/ Nitro system>.
--
-- 'kmsKeyId', 'createReplicationGroup_kmsKeyId' - The ID of the KMS key used to encrypt the disk in the cluster.
--
-- 'logDeliveryConfigurations', 'createReplicationGroup_logDeliveryConfigurations' - Specifies the destination, format and type of the logs.
--
-- 'multiAZEnabled', 'createReplicationGroup_multiAZEnabled' - A flag indicating if you have Multi-AZ enabled to enhance fault
-- tolerance. For more information, see
-- <http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/AutoFailover.html Minimizing Downtime: Multi-AZ>.
--
-- 'networkType', 'createReplicationGroup_networkType' - Must be either @ipv4@ | @ipv6@ | @dual_stack@. IPv6 is supported for
-- workloads using Redis engine version 6.2 onward or Memcached engine
-- version 1.6.6 on all instances built on the
-- <https://aws.amazon.com/ec2/nitro/ Nitro system>.
--
-- 'nodeGroupConfiguration', 'createReplicationGroup_nodeGroupConfiguration' - A list of node group (shard) configuration options. Each node group
-- (shard) configuration has the following members:
-- @PrimaryAvailabilityZone@, @ReplicaAvailabilityZones@, @ReplicaCount@,
-- and @Slots@.
--
-- If you\'re creating a Redis (cluster mode disabled) or a Redis (cluster
-- mode enabled) replication group, you can use this parameter to
-- individually configure each node group (shard), or you can omit this
-- parameter. However, it is required when seeding a Redis (cluster mode
-- enabled) cluster from a S3 rdb file. You must configure each node group
-- (shard) using this parameter because you must specify the slots for each
-- node group.
--
-- 'notificationTopicArn', 'createReplicationGroup_notificationTopicArn' - The Amazon Resource Name (ARN) of the Amazon Simple Notification Service
-- (SNS) topic to which notifications are sent.
--
-- The Amazon SNS topic owner must be the same as the cluster owner.
--
-- 'numCacheClusters', 'createReplicationGroup_numCacheClusters' - The number of clusters this replication group initially has.
--
-- This parameter is not used if there is more than one node group (shard).
-- You should use @ReplicasPerNodeGroup@ instead.
--
-- If @AutomaticFailoverEnabled@ is @true@, the value of this parameter
-- must be at least 2. If @AutomaticFailoverEnabled@ is @false@ you can
-- omit this parameter (it will default to 1), or you can explicitly set it
-- to a value between 2 and 6.
--
-- The maximum permitted value for @NumCacheClusters@ is 6 (1 primary plus
-- 5 replicas).
--
-- 'numNodeGroups', 'createReplicationGroup_numNodeGroups' - An optional parameter that specifies the number of node groups (shards)
-- for this Redis (cluster mode enabled) replication group. For Redis
-- (cluster mode disabled) either omit this parameter or set it to 1.
--
-- Default: 1
--
-- 'port', 'createReplicationGroup_port' - The port number on which each member of the replication group accepts
-- connections.
--
-- 'preferredCacheClusterAZs', 'createReplicationGroup_preferredCacheClusterAZs' - A list of EC2 Availability Zones in which the replication group\'s
-- clusters are created. The order of the Availability Zones in the list is
-- the order in which clusters are allocated. The primary cluster is
-- created in the first AZ in the list.
--
-- This parameter is not used if there is more than one node group (shard).
-- You should use @NodeGroupConfiguration@ instead.
--
-- If you are creating your replication group in an Amazon VPC
-- (recommended), you can only locate clusters in Availability Zones
-- associated with the subnets in the selected subnet group.
--
-- The number of Availability Zones listed must equal the value of
-- @NumCacheClusters@.
--
-- Default: system chosen Availability Zones.
--
-- 'preferredMaintenanceWindow', 'createReplicationGroup_preferredMaintenanceWindow' - Specifies the weekly time range during which maintenance on the cluster
-- is performed. It is specified as a range in the format
-- ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window
-- is a 60 minute period. Valid values for @ddd@ are:
--
-- Specifies the weekly time range during which maintenance on the cluster
-- is performed. It is specified as a range in the format
-- ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window
-- is a 60 minute period.
--
-- Valid values for @ddd@ are:
--
-- -   @sun@
--
-- -   @mon@
--
-- -   @tue@
--
-- -   @wed@
--
-- -   @thu@
--
-- -   @fri@
--
-- -   @sat@
--
-- Example: @sun:23:00-mon:01:30@
--
-- 'primaryClusterId', 'createReplicationGroup_primaryClusterId' - The identifier of the cluster that serves as the primary for this
-- replication group. This cluster must already exist and have a status of
-- @available@.
--
-- This parameter is not required if @NumCacheClusters@, @NumNodeGroups@,
-- or @ReplicasPerNodeGroup@ is specified.
--
-- 'replicasPerNodeGroup', 'createReplicationGroup_replicasPerNodeGroup' - An optional parameter that specifies the number of replica nodes in each
-- node group (shard). Valid values are 0 to 5.
--
-- 'securityGroupIds', 'createReplicationGroup_securityGroupIds' - One or more Amazon VPC security groups associated with this replication
-- group.
--
-- Use this parameter only when you are creating a replication group in an
-- Amazon Virtual Private Cloud (Amazon VPC).
--
-- 'snapshotArns', 'createReplicationGroup_snapshotArns' - A list of Amazon Resource Names (ARN) that uniquely identify the Redis
-- RDB snapshot files stored in Amazon S3. The snapshot files are used to
-- populate the new replication group. The Amazon S3 object name in the ARN
-- cannot contain any commas. The new replication group will have the
-- number of node groups (console: shards) specified by the parameter
-- /NumNodeGroups/ or the number of node groups configured by
-- /NodeGroupConfiguration/ regardless of the number of ARNs specified
-- here.
--
-- Example of an Amazon S3 ARN: @arn:aws:s3:::my_bucket\/snapshot1.rdb@
--
-- 'snapshotName', 'createReplicationGroup_snapshotName' - The name of a snapshot from which to restore data into the new
-- replication group. The snapshot status changes to @restoring@ while the
-- new replication group is being created.
--
-- 'snapshotRetentionLimit', 'createReplicationGroup_snapshotRetentionLimit' - The number of days for which ElastiCache retains automatic snapshots
-- before deleting them. For example, if you set @SnapshotRetentionLimit@
-- to 5, a snapshot that was taken today is retained for 5 days before
-- being deleted.
--
-- Default: 0 (i.e., automatic backups are disabled for this cluster).
--
-- 'snapshotWindow', 'createReplicationGroup_snapshotWindow' - The daily time range (in UTC) during which ElastiCache begins taking a
-- daily snapshot of your node group (shard).
--
-- Example: @05:00-09:00@
--
-- If you do not specify this parameter, ElastiCache automatically chooses
-- an appropriate time range.
--
-- 'tags', 'createReplicationGroup_tags' - A list of tags to be added to this resource. Tags are comma-separated
-- key,value pairs (e.g. Key=@myKey@, Value=@myKeyValue@. You can include
-- multiple tags as shown following: Key=@myKey@, Value=@myKeyValue@
-- Key=@mySecondKey@, Value=@mySecondKeyValue@. Tags on replication groups
-- will be replicated to all nodes.
--
-- 'transitEncryptionEnabled', 'createReplicationGroup_transitEncryptionEnabled' - A flag that enables in-transit encryption when set to @true@.
--
-- This parameter is valid only if the @Engine@ parameter is @redis@, the
-- @EngineVersion@ parameter is @3.2.6@, @4.x@ or later, and the cluster is
-- being created in an Amazon VPC.
--
-- If you enable in-transit encryption, you must also specify a value for
-- @CacheSubnetGroup@.
--
-- __Required:__ Only available when creating a replication group in an
-- Amazon VPC using redis version @3.2.6@, @4.x@ or later.
--
-- Default: @false@
--
-- For HIPAA compliance, you must specify @TransitEncryptionEnabled@ as
-- @true@, an @AuthToken@, and a @CacheSubnetGroup@.
--
-- 'transitEncryptionMode', 'createReplicationGroup_transitEncryptionMode' - A setting that allows you to migrate your clients to use in-transit
-- encryption, with no downtime.
--
-- When setting @TransitEncryptionEnabled@ to @true@, you can set your
-- @TransitEncryptionMode@ to @preferred@ in the same request, to allow
-- both encrypted and unencrypted connections at the same time. Once you
-- migrate all your Redis clients to use encrypted connections you can
-- modify the value to @required@ to allow encrypted connections only.
--
-- Setting @TransitEncryptionMode@ to @required@ is a two-step process that
-- requires you to first set the @TransitEncryptionMode@ to @preferred@
-- first, after that you can set @TransitEncryptionMode@ to @required@.
--
-- 'userGroupIds', 'createReplicationGroup_userGroupIds' - The user group to associate with the replication group.
--
-- 'replicationGroupId', 'createReplicationGroup_replicationGroupId' - The replication group identifier. This parameter is stored as a
-- lowercase string.
--
-- Constraints:
--
-- -   A name must contain from 1 to 40 alphanumeric characters or hyphens.
--
-- -   The first character must be a letter.
--
-- -   A name cannot end with a hyphen or contain two consecutive hyphens.
--
-- 'replicationGroupDescription', 'createReplicationGroup_replicationGroupDescription' - A user-created description for the replication group.
newCreateReplicationGroup ::
  -- | 'replicationGroupId'
  Prelude.Text ->
  -- | 'replicationGroupDescription'
  Prelude.Text ->
  CreateReplicationGroup
newCreateReplicationGroup :: Text -> Text -> CreateReplicationGroup
newCreateReplicationGroup
  Text
pReplicationGroupId_
  Text
pReplicationGroupDescription_ =
    CreateReplicationGroup'
      { $sel:atRestEncryptionEnabled:CreateReplicationGroup' :: Maybe Bool
atRestEncryptionEnabled =
          forall a. Maybe a
Prelude.Nothing,
        $sel:authToken:CreateReplicationGroup' :: Maybe Text
authToken = forall a. Maybe a
Prelude.Nothing,
        $sel:autoMinorVersionUpgrade:CreateReplicationGroup' :: Maybe Bool
autoMinorVersionUpgrade = forall a. Maybe a
Prelude.Nothing,
        $sel:automaticFailoverEnabled:CreateReplicationGroup' :: Maybe Bool
automaticFailoverEnabled = forall a. Maybe a
Prelude.Nothing,
        $sel:cacheNodeType:CreateReplicationGroup' :: Maybe Text
cacheNodeType = forall a. Maybe a
Prelude.Nothing,
        $sel:cacheParameterGroupName:CreateReplicationGroup' :: Maybe Text
cacheParameterGroupName = forall a. Maybe a
Prelude.Nothing,
        $sel:cacheSecurityGroupNames:CreateReplicationGroup' :: Maybe [Text]
cacheSecurityGroupNames = forall a. Maybe a
Prelude.Nothing,
        $sel:cacheSubnetGroupName:CreateReplicationGroup' :: Maybe Text
cacheSubnetGroupName = forall a. Maybe a
Prelude.Nothing,
        $sel:dataTieringEnabled:CreateReplicationGroup' :: Maybe Bool
dataTieringEnabled = forall a. Maybe a
Prelude.Nothing,
        $sel:engine:CreateReplicationGroup' :: Maybe Text
engine = forall a. Maybe a
Prelude.Nothing,
        $sel:engineVersion:CreateReplicationGroup' :: Maybe Text
engineVersion = forall a. Maybe a
Prelude.Nothing,
        $sel:globalReplicationGroupId:CreateReplicationGroup' :: Maybe Text
globalReplicationGroupId = forall a. Maybe a
Prelude.Nothing,
        $sel:ipDiscovery:CreateReplicationGroup' :: Maybe IpDiscovery
ipDiscovery = forall a. Maybe a
Prelude.Nothing,
        $sel:kmsKeyId:CreateReplicationGroup' :: Maybe Text
kmsKeyId = forall a. Maybe a
Prelude.Nothing,
        $sel:logDeliveryConfigurations:CreateReplicationGroup' :: Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations = forall a. Maybe a
Prelude.Nothing,
        $sel:multiAZEnabled:CreateReplicationGroup' :: Maybe Bool
multiAZEnabled = forall a. Maybe a
Prelude.Nothing,
        $sel:networkType:CreateReplicationGroup' :: Maybe NetworkType
networkType = forall a. Maybe a
Prelude.Nothing,
        $sel:nodeGroupConfiguration:CreateReplicationGroup' :: Maybe [NodeGroupConfiguration]
nodeGroupConfiguration = forall a. Maybe a
Prelude.Nothing,
        $sel:notificationTopicArn:CreateReplicationGroup' :: Maybe Text
notificationTopicArn = forall a. Maybe a
Prelude.Nothing,
        $sel:numCacheClusters:CreateReplicationGroup' :: Maybe Int
numCacheClusters = forall a. Maybe a
Prelude.Nothing,
        $sel:numNodeGroups:CreateReplicationGroup' :: Maybe Int
numNodeGroups = forall a. Maybe a
Prelude.Nothing,
        $sel:port:CreateReplicationGroup' :: Maybe Int
port = forall a. Maybe a
Prelude.Nothing,
        $sel:preferredCacheClusterAZs:CreateReplicationGroup' :: Maybe [Text]
preferredCacheClusterAZs = forall a. Maybe a
Prelude.Nothing,
        $sel:preferredMaintenanceWindow:CreateReplicationGroup' :: Maybe Text
preferredMaintenanceWindow = forall a. Maybe a
Prelude.Nothing,
        $sel:primaryClusterId:CreateReplicationGroup' :: Maybe Text
primaryClusterId = forall a. Maybe a
Prelude.Nothing,
        $sel:replicasPerNodeGroup:CreateReplicationGroup' :: Maybe Int
replicasPerNodeGroup = forall a. Maybe a
Prelude.Nothing,
        $sel:securityGroupIds:CreateReplicationGroup' :: Maybe [Text]
securityGroupIds = forall a. Maybe a
Prelude.Nothing,
        $sel:snapshotArns:CreateReplicationGroup' :: Maybe [Text]
snapshotArns = forall a. Maybe a
Prelude.Nothing,
        $sel:snapshotName:CreateReplicationGroup' :: Maybe Text
snapshotName = forall a. Maybe a
Prelude.Nothing,
        $sel:snapshotRetentionLimit:CreateReplicationGroup' :: Maybe Int
snapshotRetentionLimit = forall a. Maybe a
Prelude.Nothing,
        $sel:snapshotWindow:CreateReplicationGroup' :: Maybe Text
snapshotWindow = forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateReplicationGroup' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:transitEncryptionEnabled:CreateReplicationGroup' :: Maybe Bool
transitEncryptionEnabled = forall a. Maybe a
Prelude.Nothing,
        $sel:transitEncryptionMode:CreateReplicationGroup' :: Maybe TransitEncryptionMode
transitEncryptionMode = forall a. Maybe a
Prelude.Nothing,
        $sel:userGroupIds:CreateReplicationGroup' :: Maybe (NonEmpty Text)
userGroupIds = forall a. Maybe a
Prelude.Nothing,
        $sel:replicationGroupId:CreateReplicationGroup' :: Text
replicationGroupId = Text
pReplicationGroupId_,
        $sel:replicationGroupDescription:CreateReplicationGroup' :: Text
replicationGroupDescription =
          Text
pReplicationGroupDescription_
      }

-- | A flag that enables encryption at rest when set to @true@.
--
-- You cannot modify the value of @AtRestEncryptionEnabled@ after the
-- replication group is created. To enable encryption at rest on a
-- replication group you must set @AtRestEncryptionEnabled@ to @true@ when
-- you create the replication group.
--
-- __Required:__ Only available when creating a replication group in an
-- Amazon VPC using redis version @3.2.6@, @4.x@ or later.
--
-- Default: @false@
createReplicationGroup_atRestEncryptionEnabled :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Bool)
createReplicationGroup_atRestEncryptionEnabled :: Lens' CreateReplicationGroup (Maybe Bool)
createReplicationGroup_atRestEncryptionEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe Bool
atRestEncryptionEnabled :: Maybe Bool
$sel:atRestEncryptionEnabled:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
atRestEncryptionEnabled} -> Maybe Bool
atRestEncryptionEnabled) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe Bool
a -> CreateReplicationGroup
s {$sel:atRestEncryptionEnabled:CreateReplicationGroup' :: Maybe Bool
atRestEncryptionEnabled = Maybe Bool
a} :: CreateReplicationGroup)

-- | __Reserved parameter.__ The password used to access a password protected
-- server.
--
-- @AuthToken@ can be specified only on replication groups where
-- @TransitEncryptionEnabled@ is @true@.
--
-- For HIPAA compliance, you must specify @TransitEncryptionEnabled@ as
-- @true@, an @AuthToken@, and a @CacheSubnetGroup@.
--
-- Password constraints:
--
-- -   Must be only printable ASCII characters.
--
-- -   Must be at least 16 characters and no more than 128 characters in
--     length.
--
-- -   The only permitted printable special characters are !, &, #, $, ^,
--     \<, >, and -. Other printable special characters cannot be used in
--     the AUTH token.
--
-- For more information, see <http://redis.io/commands/AUTH AUTH password>
-- at http:\/\/redis.io\/commands\/AUTH.
createReplicationGroup_authToken :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Text)
createReplicationGroup_authToken :: Lens' CreateReplicationGroup (Maybe Text)
createReplicationGroup_authToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe Text
authToken :: Maybe Text
$sel:authToken:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
authToken} -> Maybe Text
authToken) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe Text
a -> CreateReplicationGroup
s {$sel:authToken:CreateReplicationGroup' :: Maybe Text
authToken = Maybe Text
a} :: CreateReplicationGroup)

-- | If you are running Redis engine version 6.0 or later, set this
-- parameter to yes if you want to opt-in to the next auto minor version
-- upgrade campaign. This parameter is disabled for previous versions.
createReplicationGroup_autoMinorVersionUpgrade :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Bool)
createReplicationGroup_autoMinorVersionUpgrade :: Lens' CreateReplicationGroup (Maybe Bool)
createReplicationGroup_autoMinorVersionUpgrade = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe Bool
autoMinorVersionUpgrade :: Maybe Bool
$sel:autoMinorVersionUpgrade:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
autoMinorVersionUpgrade} -> Maybe Bool
autoMinorVersionUpgrade) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe Bool
a -> CreateReplicationGroup
s {$sel:autoMinorVersionUpgrade:CreateReplicationGroup' :: Maybe Bool
autoMinorVersionUpgrade = Maybe Bool
a} :: CreateReplicationGroup)

-- | Specifies whether a read-only replica is automatically promoted to
-- read\/write primary if the existing primary fails.
--
-- @AutomaticFailoverEnabled@ must be enabled for Redis (cluster mode
-- enabled) replication groups.
--
-- Default: false
createReplicationGroup_automaticFailoverEnabled :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Bool)
createReplicationGroup_automaticFailoverEnabled :: Lens' CreateReplicationGroup (Maybe Bool)
createReplicationGroup_automaticFailoverEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe Bool
automaticFailoverEnabled :: Maybe Bool
$sel:automaticFailoverEnabled:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
automaticFailoverEnabled} -> Maybe Bool
automaticFailoverEnabled) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe Bool
a -> CreateReplicationGroup
s {$sel:automaticFailoverEnabled:CreateReplicationGroup' :: Maybe Bool
automaticFailoverEnabled = Maybe Bool
a} :: CreateReplicationGroup)

-- | The compute and memory capacity of the nodes in the node group (shard).
--
-- The following node types are supported by ElastiCache. Generally
-- speaking, the current generation types provide more memory and
-- computational power at lower cost when compared to their equivalent
-- previous generation counterparts.
--
-- -   General purpose:
--
--     -   Current generation:
--
--         __M6g node types__ (available only for Redis engine version
--         5.0.6 onward and for Memcached engine version 1.5.16 onward):
--         @cache.m6g.large@, @cache.m6g.xlarge@, @cache.m6g.2xlarge@,
--         @cache.m6g.4xlarge@, @cache.m6g.8xlarge@, @cache.m6g.12xlarge@,
--         @cache.m6g.16xlarge@
--
--         For region availability, see
--         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
--
--         __M5 node types:__ @cache.m5.large@, @cache.m5.xlarge@,
--         @cache.m5.2xlarge@, @cache.m5.4xlarge@, @cache.m5.12xlarge@,
--         @cache.m5.24xlarge@
--
--         __M4 node types:__ @cache.m4.large@, @cache.m4.xlarge@,
--         @cache.m4.2xlarge@, @cache.m4.4xlarge@, @cache.m4.10xlarge@
--
--         __T4g node types__ (available only for Redis engine version
--         5.0.6 onward and Memcached engine version 1.5.16 onward):
--         @cache.t4g.micro@, @cache.t4g.small@, @cache.t4g.medium@
--
--         __T3 node types:__ @cache.t3.micro@, @cache.t3.small@,
--         @cache.t3.medium@
--
--         __T2 node types:__ @cache.t2.micro@, @cache.t2.small@,
--         @cache.t2.medium@
--
--     -   Previous generation: (not recommended. Existing clusters are
--         still supported but creation of new clusters is not supported
--         for these types.)
--
--         __T1 node types:__ @cache.t1.micro@
--
--         __M1 node types:__ @cache.m1.small@, @cache.m1.medium@,
--         @cache.m1.large@, @cache.m1.xlarge@
--
--         __M3 node types:__ @cache.m3.medium@, @cache.m3.large@,
--         @cache.m3.xlarge@, @cache.m3.2xlarge@
--
-- -   Compute optimized:
--
--     -   Previous generation: (not recommended. Existing clusters are
--         still supported but creation of new clusters is not supported
--         for these types.)
--
--         __C1 node types:__ @cache.c1.xlarge@
--
-- -   Memory optimized:
--
--     -   Current generation:
--
--         __R6g node types__ (available only for Redis engine version
--         5.0.6 onward and for Memcached engine version 1.5.16 onward).
--
--         @cache.r6g.large@, @cache.r6g.xlarge@, @cache.r6g.2xlarge@,
--         @cache.r6g.4xlarge@, @cache.r6g.8xlarge@, @cache.r6g.12xlarge@,
--         @cache.r6g.16xlarge@
--
--         For region availability, see
--         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
--
--         __R5 node types:__ @cache.r5.large@, @cache.r5.xlarge@,
--         @cache.r5.2xlarge@, @cache.r5.4xlarge@, @cache.r5.12xlarge@,
--         @cache.r5.24xlarge@
--
--         __R4 node types:__ @cache.r4.large@, @cache.r4.xlarge@,
--         @cache.r4.2xlarge@, @cache.r4.4xlarge@, @cache.r4.8xlarge@,
--         @cache.r4.16xlarge@
--
--     -   Previous generation: (not recommended. Existing clusters are
--         still supported but creation of new clusters is not supported
--         for these types.)
--
--         __M2 node types:__ @cache.m2.xlarge@, @cache.m2.2xlarge@,
--         @cache.m2.4xlarge@
--
--         __R3 node types:__ @cache.r3.large@, @cache.r3.xlarge@,
--         @cache.r3.2xlarge@, @cache.r3.4xlarge@, @cache.r3.8xlarge@
--
-- __Additional node type info__
--
-- -   All current generation instance types are created in Amazon VPC by
--     default.
--
-- -   Redis append-only files (AOF) are not supported for T1 or T2
--     instances.
--
-- -   Redis Multi-AZ with automatic failover is not supported on T1
--     instances.
--
-- -   Redis configuration variables @appendonly@ and @appendfsync@ are not
--     supported on Redis version 2.8.22 and later.
createReplicationGroup_cacheNodeType :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Text)
createReplicationGroup_cacheNodeType :: Lens' CreateReplicationGroup (Maybe Text)
createReplicationGroup_cacheNodeType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe Text
cacheNodeType :: Maybe Text
$sel:cacheNodeType:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
cacheNodeType} -> Maybe Text
cacheNodeType) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe Text
a -> CreateReplicationGroup
s {$sel:cacheNodeType:CreateReplicationGroup' :: Maybe Text
cacheNodeType = Maybe Text
a} :: CreateReplicationGroup)

-- | The name of the parameter group to associate with this replication
-- group. If this argument is omitted, the default cache parameter group
-- for the specified engine is used.
--
-- If you are running Redis version 3.2.4 or later, only one node group
-- (shard), and want to use a default parameter group, we recommend that
-- you specify the parameter group by name.
--
-- -   To create a Redis (cluster mode disabled) replication group, use
--     @CacheParameterGroupName=default.redis3.2@.
--
-- -   To create a Redis (cluster mode enabled) replication group, use
--     @CacheParameterGroupName=default.redis3.2.cluster.on@.
createReplicationGroup_cacheParameterGroupName :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Text)
createReplicationGroup_cacheParameterGroupName :: Lens' CreateReplicationGroup (Maybe Text)
createReplicationGroup_cacheParameterGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe Text
cacheParameterGroupName :: Maybe Text
$sel:cacheParameterGroupName:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
cacheParameterGroupName} -> Maybe Text
cacheParameterGroupName) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe Text
a -> CreateReplicationGroup
s {$sel:cacheParameterGroupName:CreateReplicationGroup' :: Maybe Text
cacheParameterGroupName = Maybe Text
a} :: CreateReplicationGroup)

-- | A list of cache security group names to associate with this replication
-- group.
createReplicationGroup_cacheSecurityGroupNames :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe [Prelude.Text])
createReplicationGroup_cacheSecurityGroupNames :: Lens' CreateReplicationGroup (Maybe [Text])
createReplicationGroup_cacheSecurityGroupNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe [Text]
cacheSecurityGroupNames :: Maybe [Text]
$sel:cacheSecurityGroupNames:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Text]
cacheSecurityGroupNames} -> Maybe [Text]
cacheSecurityGroupNames) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe [Text]
a -> CreateReplicationGroup
s {$sel:cacheSecurityGroupNames:CreateReplicationGroup' :: Maybe [Text]
cacheSecurityGroupNames = Maybe [Text]
a} :: CreateReplicationGroup) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the cache subnet group to be used for the replication group.
--
-- If you\'re going to launch your cluster in an Amazon VPC, you need to
-- create a subnet group before you start creating a cluster. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SubnetGroups.html Subnets and Subnet Groups>.
createReplicationGroup_cacheSubnetGroupName :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Text)
createReplicationGroup_cacheSubnetGroupName :: Lens' CreateReplicationGroup (Maybe Text)
createReplicationGroup_cacheSubnetGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe Text
cacheSubnetGroupName :: Maybe Text
$sel:cacheSubnetGroupName:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
cacheSubnetGroupName} -> Maybe Text
cacheSubnetGroupName) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe Text
a -> CreateReplicationGroup
s {$sel:cacheSubnetGroupName:CreateReplicationGroup' :: Maybe Text
cacheSubnetGroupName = Maybe Text
a} :: CreateReplicationGroup)

-- | Enables data tiering. Data tiering is only supported for replication
-- groups using the r6gd node type. This parameter must be set to true when
-- using r6gd nodes. For more information, see
-- <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/data-tiering.html Data tiering>.
createReplicationGroup_dataTieringEnabled :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Bool)
createReplicationGroup_dataTieringEnabled :: Lens' CreateReplicationGroup (Maybe Bool)
createReplicationGroup_dataTieringEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe Bool
dataTieringEnabled :: Maybe Bool
$sel:dataTieringEnabled:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
dataTieringEnabled} -> Maybe Bool
dataTieringEnabled) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe Bool
a -> CreateReplicationGroup
s {$sel:dataTieringEnabled:CreateReplicationGroup' :: Maybe Bool
dataTieringEnabled = Maybe Bool
a} :: CreateReplicationGroup)

-- | The name of the cache engine to be used for the clusters in this
-- replication group. The value must be set to @Redis@.
createReplicationGroup_engine :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Text)
createReplicationGroup_engine :: Lens' CreateReplicationGroup (Maybe Text)
createReplicationGroup_engine = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe Text
engine :: Maybe Text
$sel:engine:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
engine} -> Maybe Text
engine) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe Text
a -> CreateReplicationGroup
s {$sel:engine:CreateReplicationGroup' :: Maybe Text
engine = Maybe Text
a} :: CreateReplicationGroup)

-- | The version number of the cache engine to be used for the clusters in
-- this replication group. To view the supported cache engine versions, use
-- the @DescribeCacheEngineVersions@ operation.
--
-- __Important:__ You can upgrade to a newer engine version (see
-- <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement Selecting a Cache Engine and Version>)
-- in the /ElastiCache User Guide/, but you cannot downgrade to an earlier
-- engine version. If you want to use an earlier engine version, you must
-- delete the existing cluster or replication group and create it anew with
-- the earlier engine version.
createReplicationGroup_engineVersion :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Text)
createReplicationGroup_engineVersion :: Lens' CreateReplicationGroup (Maybe Text)
createReplicationGroup_engineVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe Text
a -> CreateReplicationGroup
s {$sel:engineVersion:CreateReplicationGroup' :: Maybe Text
engineVersion = Maybe Text
a} :: CreateReplicationGroup)

-- | The name of the Global datastore
createReplicationGroup_globalReplicationGroupId :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Text)
createReplicationGroup_globalReplicationGroupId :: Lens' CreateReplicationGroup (Maybe Text)
createReplicationGroup_globalReplicationGroupId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe Text
globalReplicationGroupId :: Maybe Text
$sel:globalReplicationGroupId:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
globalReplicationGroupId} -> Maybe Text
globalReplicationGroupId) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe Text
a -> CreateReplicationGroup
s {$sel:globalReplicationGroupId:CreateReplicationGroup' :: Maybe Text
globalReplicationGroupId = Maybe Text
a} :: CreateReplicationGroup)

-- | The network type you choose when creating a replication group, either
-- @ipv4@ | @ipv6@. IPv6 is supported for workloads using Redis engine
-- version 6.2 onward or Memcached engine version 1.6.6 on all instances
-- built on the <https://aws.amazon.com/ec2/nitro/ Nitro system>.
createReplicationGroup_ipDiscovery :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe IpDiscovery)
createReplicationGroup_ipDiscovery :: Lens' CreateReplicationGroup (Maybe IpDiscovery)
createReplicationGroup_ipDiscovery = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe IpDiscovery
ipDiscovery :: Maybe IpDiscovery
$sel:ipDiscovery:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe IpDiscovery
ipDiscovery} -> Maybe IpDiscovery
ipDiscovery) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe IpDiscovery
a -> CreateReplicationGroup
s {$sel:ipDiscovery:CreateReplicationGroup' :: Maybe IpDiscovery
ipDiscovery = Maybe IpDiscovery
a} :: CreateReplicationGroup)

-- | The ID of the KMS key used to encrypt the disk in the cluster.
createReplicationGroup_kmsKeyId :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Text)
createReplicationGroup_kmsKeyId :: Lens' CreateReplicationGroup (Maybe Text)
createReplicationGroup_kmsKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe Text
a -> CreateReplicationGroup
s {$sel:kmsKeyId:CreateReplicationGroup' :: Maybe Text
kmsKeyId = Maybe Text
a} :: CreateReplicationGroup)

-- | Specifies the destination, format and type of the logs.
createReplicationGroup_logDeliveryConfigurations :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe [LogDeliveryConfigurationRequest])
createReplicationGroup_logDeliveryConfigurations :: Lens'
  CreateReplicationGroup (Maybe [LogDeliveryConfigurationRequest])
createReplicationGroup_logDeliveryConfigurations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations :: Maybe [LogDeliveryConfigurationRequest]
$sel:logDeliveryConfigurations:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations} -> Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe [LogDeliveryConfigurationRequest]
a -> CreateReplicationGroup
s {$sel:logDeliveryConfigurations:CreateReplicationGroup' :: Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations = Maybe [LogDeliveryConfigurationRequest]
a} :: CreateReplicationGroup) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A flag indicating if you have Multi-AZ enabled to enhance fault
-- tolerance. For more information, see
-- <http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/AutoFailover.html Minimizing Downtime: Multi-AZ>.
createReplicationGroup_multiAZEnabled :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Bool)
createReplicationGroup_multiAZEnabled :: Lens' CreateReplicationGroup (Maybe Bool)
createReplicationGroup_multiAZEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe Bool
multiAZEnabled :: Maybe Bool
$sel:multiAZEnabled:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
multiAZEnabled} -> Maybe Bool
multiAZEnabled) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe Bool
a -> CreateReplicationGroup
s {$sel:multiAZEnabled:CreateReplicationGroup' :: Maybe Bool
multiAZEnabled = Maybe Bool
a} :: CreateReplicationGroup)

-- | Must be either @ipv4@ | @ipv6@ | @dual_stack@. IPv6 is supported for
-- workloads using Redis engine version 6.2 onward or Memcached engine
-- version 1.6.6 on all instances built on the
-- <https://aws.amazon.com/ec2/nitro/ Nitro system>.
createReplicationGroup_networkType :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe NetworkType)
createReplicationGroup_networkType :: Lens' CreateReplicationGroup (Maybe NetworkType)
createReplicationGroup_networkType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe NetworkType
networkType :: Maybe NetworkType
$sel:networkType:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe NetworkType
networkType} -> Maybe NetworkType
networkType) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe NetworkType
a -> CreateReplicationGroup
s {$sel:networkType:CreateReplicationGroup' :: Maybe NetworkType
networkType = Maybe NetworkType
a} :: CreateReplicationGroup)

-- | A list of node group (shard) configuration options. Each node group
-- (shard) configuration has the following members:
-- @PrimaryAvailabilityZone@, @ReplicaAvailabilityZones@, @ReplicaCount@,
-- and @Slots@.
--
-- If you\'re creating a Redis (cluster mode disabled) or a Redis (cluster
-- mode enabled) replication group, you can use this parameter to
-- individually configure each node group (shard), or you can omit this
-- parameter. However, it is required when seeding a Redis (cluster mode
-- enabled) cluster from a S3 rdb file. You must configure each node group
-- (shard) using this parameter because you must specify the slots for each
-- node group.
createReplicationGroup_nodeGroupConfiguration :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe [NodeGroupConfiguration])
createReplicationGroup_nodeGroupConfiguration :: Lens' CreateReplicationGroup (Maybe [NodeGroupConfiguration])
createReplicationGroup_nodeGroupConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe [NodeGroupConfiguration]
nodeGroupConfiguration :: Maybe [NodeGroupConfiguration]
$sel:nodeGroupConfiguration:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [NodeGroupConfiguration]
nodeGroupConfiguration} -> Maybe [NodeGroupConfiguration]
nodeGroupConfiguration) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe [NodeGroupConfiguration]
a -> CreateReplicationGroup
s {$sel:nodeGroupConfiguration:CreateReplicationGroup' :: Maybe [NodeGroupConfiguration]
nodeGroupConfiguration = Maybe [NodeGroupConfiguration]
a} :: CreateReplicationGroup) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Name (ARN) of the Amazon Simple Notification Service
-- (SNS) topic to which notifications are sent.
--
-- The Amazon SNS topic owner must be the same as the cluster owner.
createReplicationGroup_notificationTopicArn :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Text)
createReplicationGroup_notificationTopicArn :: Lens' CreateReplicationGroup (Maybe Text)
createReplicationGroup_notificationTopicArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe Text
notificationTopicArn :: Maybe Text
$sel:notificationTopicArn:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
notificationTopicArn} -> Maybe Text
notificationTopicArn) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe Text
a -> CreateReplicationGroup
s {$sel:notificationTopicArn:CreateReplicationGroup' :: Maybe Text
notificationTopicArn = Maybe Text
a} :: CreateReplicationGroup)

-- | The number of clusters this replication group initially has.
--
-- This parameter is not used if there is more than one node group (shard).
-- You should use @ReplicasPerNodeGroup@ instead.
--
-- If @AutomaticFailoverEnabled@ is @true@, the value of this parameter
-- must be at least 2. If @AutomaticFailoverEnabled@ is @false@ you can
-- omit this parameter (it will default to 1), or you can explicitly set it
-- to a value between 2 and 6.
--
-- The maximum permitted value for @NumCacheClusters@ is 6 (1 primary plus
-- 5 replicas).
createReplicationGroup_numCacheClusters :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Int)
createReplicationGroup_numCacheClusters :: Lens' CreateReplicationGroup (Maybe Int)
createReplicationGroup_numCacheClusters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe Int
numCacheClusters :: Maybe Int
$sel:numCacheClusters:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
numCacheClusters} -> Maybe Int
numCacheClusters) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe Int
a -> CreateReplicationGroup
s {$sel:numCacheClusters:CreateReplicationGroup' :: Maybe Int
numCacheClusters = Maybe Int
a} :: CreateReplicationGroup)

-- | An optional parameter that specifies the number of node groups (shards)
-- for this Redis (cluster mode enabled) replication group. For Redis
-- (cluster mode disabled) either omit this parameter or set it to 1.
--
-- Default: 1
createReplicationGroup_numNodeGroups :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Int)
createReplicationGroup_numNodeGroups :: Lens' CreateReplicationGroup (Maybe Int)
createReplicationGroup_numNodeGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe Int
numNodeGroups :: Maybe Int
$sel:numNodeGroups:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
numNodeGroups} -> Maybe Int
numNodeGroups) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe Int
a -> CreateReplicationGroup
s {$sel:numNodeGroups:CreateReplicationGroup' :: Maybe Int
numNodeGroups = Maybe Int
a} :: CreateReplicationGroup)

-- | The port number on which each member of the replication group accepts
-- connections.
createReplicationGroup_port :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Int)
createReplicationGroup_port :: Lens' CreateReplicationGroup (Maybe Int)
createReplicationGroup_port = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe Int
port :: Maybe Int
$sel:port:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
port} -> Maybe Int
port) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe Int
a -> CreateReplicationGroup
s {$sel:port:CreateReplicationGroup' :: Maybe Int
port = Maybe Int
a} :: CreateReplicationGroup)

-- | A list of EC2 Availability Zones in which the replication group\'s
-- clusters are created. The order of the Availability Zones in the list is
-- the order in which clusters are allocated. The primary cluster is
-- created in the first AZ in the list.
--
-- This parameter is not used if there is more than one node group (shard).
-- You should use @NodeGroupConfiguration@ instead.
--
-- If you are creating your replication group in an Amazon VPC
-- (recommended), you can only locate clusters in Availability Zones
-- associated with the subnets in the selected subnet group.
--
-- The number of Availability Zones listed must equal the value of
-- @NumCacheClusters@.
--
-- Default: system chosen Availability Zones.
createReplicationGroup_preferredCacheClusterAZs :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe [Prelude.Text])
createReplicationGroup_preferredCacheClusterAZs :: Lens' CreateReplicationGroup (Maybe [Text])
createReplicationGroup_preferredCacheClusterAZs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe [Text]
preferredCacheClusterAZs :: Maybe [Text]
$sel:preferredCacheClusterAZs:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Text]
preferredCacheClusterAZs} -> Maybe [Text]
preferredCacheClusterAZs) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe [Text]
a -> CreateReplicationGroup
s {$sel:preferredCacheClusterAZs:CreateReplicationGroup' :: Maybe [Text]
preferredCacheClusterAZs = Maybe [Text]
a} :: CreateReplicationGroup) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Specifies the weekly time range during which maintenance on the cluster
-- is performed. It is specified as a range in the format
-- ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window
-- is a 60 minute period. Valid values for @ddd@ are:
--
-- Specifies the weekly time range during which maintenance on the cluster
-- is performed. It is specified as a range in the format
-- ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window
-- is a 60 minute period.
--
-- Valid values for @ddd@ are:
--
-- -   @sun@
--
-- -   @mon@
--
-- -   @tue@
--
-- -   @wed@
--
-- -   @thu@
--
-- -   @fri@
--
-- -   @sat@
--
-- Example: @sun:23:00-mon:01:30@
createReplicationGroup_preferredMaintenanceWindow :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Text)
createReplicationGroup_preferredMaintenanceWindow :: Lens' CreateReplicationGroup (Maybe Text)
createReplicationGroup_preferredMaintenanceWindow = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe Text
preferredMaintenanceWindow :: Maybe Text
$sel:preferredMaintenanceWindow:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
preferredMaintenanceWindow} -> Maybe Text
preferredMaintenanceWindow) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe Text
a -> CreateReplicationGroup
s {$sel:preferredMaintenanceWindow:CreateReplicationGroup' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
a} :: CreateReplicationGroup)

-- | The identifier of the cluster that serves as the primary for this
-- replication group. This cluster must already exist and have a status of
-- @available@.
--
-- This parameter is not required if @NumCacheClusters@, @NumNodeGroups@,
-- or @ReplicasPerNodeGroup@ is specified.
createReplicationGroup_primaryClusterId :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Text)
createReplicationGroup_primaryClusterId :: Lens' CreateReplicationGroup (Maybe Text)
createReplicationGroup_primaryClusterId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe Text
primaryClusterId :: Maybe Text
$sel:primaryClusterId:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
primaryClusterId} -> Maybe Text
primaryClusterId) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe Text
a -> CreateReplicationGroup
s {$sel:primaryClusterId:CreateReplicationGroup' :: Maybe Text
primaryClusterId = Maybe Text
a} :: CreateReplicationGroup)

-- | An optional parameter that specifies the number of replica nodes in each
-- node group (shard). Valid values are 0 to 5.
createReplicationGroup_replicasPerNodeGroup :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Int)
createReplicationGroup_replicasPerNodeGroup :: Lens' CreateReplicationGroup (Maybe Int)
createReplicationGroup_replicasPerNodeGroup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe Int
replicasPerNodeGroup :: Maybe Int
$sel:replicasPerNodeGroup:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
replicasPerNodeGroup} -> Maybe Int
replicasPerNodeGroup) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe Int
a -> CreateReplicationGroup
s {$sel:replicasPerNodeGroup:CreateReplicationGroup' :: Maybe Int
replicasPerNodeGroup = Maybe Int
a} :: CreateReplicationGroup)

-- | One or more Amazon VPC security groups associated with this replication
-- group.
--
-- Use this parameter only when you are creating a replication group in an
-- Amazon Virtual Private Cloud (Amazon VPC).
createReplicationGroup_securityGroupIds :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe [Prelude.Text])
createReplicationGroup_securityGroupIds :: Lens' CreateReplicationGroup (Maybe [Text])
createReplicationGroup_securityGroupIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe [Text]
securityGroupIds :: Maybe [Text]
$sel:securityGroupIds:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Text]
securityGroupIds} -> Maybe [Text]
securityGroupIds) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe [Text]
a -> CreateReplicationGroup
s {$sel:securityGroupIds:CreateReplicationGroup' :: Maybe [Text]
securityGroupIds = Maybe [Text]
a} :: CreateReplicationGroup) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of Amazon Resource Names (ARN) that uniquely identify the Redis
-- RDB snapshot files stored in Amazon S3. The snapshot files are used to
-- populate the new replication group. The Amazon S3 object name in the ARN
-- cannot contain any commas. The new replication group will have the
-- number of node groups (console: shards) specified by the parameter
-- /NumNodeGroups/ or the number of node groups configured by
-- /NodeGroupConfiguration/ regardless of the number of ARNs specified
-- here.
--
-- Example of an Amazon S3 ARN: @arn:aws:s3:::my_bucket\/snapshot1.rdb@
createReplicationGroup_snapshotArns :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe [Prelude.Text])
createReplicationGroup_snapshotArns :: Lens' CreateReplicationGroup (Maybe [Text])
createReplicationGroup_snapshotArns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe [Text]
snapshotArns :: Maybe [Text]
$sel:snapshotArns:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Text]
snapshotArns} -> Maybe [Text]
snapshotArns) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe [Text]
a -> CreateReplicationGroup
s {$sel:snapshotArns:CreateReplicationGroup' :: Maybe [Text]
snapshotArns = Maybe [Text]
a} :: CreateReplicationGroup) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of a snapshot from which to restore data into the new
-- replication group. The snapshot status changes to @restoring@ while the
-- new replication group is being created.
createReplicationGroup_snapshotName :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Text)
createReplicationGroup_snapshotName :: Lens' CreateReplicationGroup (Maybe Text)
createReplicationGroup_snapshotName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe Text
snapshotName :: Maybe Text
$sel:snapshotName:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
snapshotName} -> Maybe Text
snapshotName) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe Text
a -> CreateReplicationGroup
s {$sel:snapshotName:CreateReplicationGroup' :: Maybe Text
snapshotName = Maybe Text
a} :: CreateReplicationGroup)

-- | The number of days for which ElastiCache retains automatic snapshots
-- before deleting them. For example, if you set @SnapshotRetentionLimit@
-- to 5, a snapshot that was taken today is retained for 5 days before
-- being deleted.
--
-- Default: 0 (i.e., automatic backups are disabled for this cluster).
createReplicationGroup_snapshotRetentionLimit :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Int)
createReplicationGroup_snapshotRetentionLimit :: Lens' CreateReplicationGroup (Maybe Int)
createReplicationGroup_snapshotRetentionLimit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe Int
snapshotRetentionLimit :: Maybe Int
$sel:snapshotRetentionLimit:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
snapshotRetentionLimit} -> Maybe Int
snapshotRetentionLimit) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe Int
a -> CreateReplicationGroup
s {$sel:snapshotRetentionLimit:CreateReplicationGroup' :: Maybe Int
snapshotRetentionLimit = Maybe Int
a} :: CreateReplicationGroup)

-- | The daily time range (in UTC) during which ElastiCache begins taking a
-- daily snapshot of your node group (shard).
--
-- Example: @05:00-09:00@
--
-- If you do not specify this parameter, ElastiCache automatically chooses
-- an appropriate time range.
createReplicationGroup_snapshotWindow :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Text)
createReplicationGroup_snapshotWindow :: Lens' CreateReplicationGroup (Maybe Text)
createReplicationGroup_snapshotWindow = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe Text
snapshotWindow :: Maybe Text
$sel:snapshotWindow:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
snapshotWindow} -> Maybe Text
snapshotWindow) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe Text
a -> CreateReplicationGroup
s {$sel:snapshotWindow:CreateReplicationGroup' :: Maybe Text
snapshotWindow = Maybe Text
a} :: CreateReplicationGroup)

-- | A list of tags to be added to this resource. Tags are comma-separated
-- key,value pairs (e.g. Key=@myKey@, Value=@myKeyValue@. You can include
-- multiple tags as shown following: Key=@myKey@, Value=@myKeyValue@
-- Key=@mySecondKey@, Value=@mySecondKeyValue@. Tags on replication groups
-- will be replicated to all nodes.
createReplicationGroup_tags :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe [Tag])
createReplicationGroup_tags :: Lens' CreateReplicationGroup (Maybe [Tag])
createReplicationGroup_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe [Tag]
a -> CreateReplicationGroup
s {$sel:tags:CreateReplicationGroup' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateReplicationGroup) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A flag that enables in-transit encryption when set to @true@.
--
-- This parameter is valid only if the @Engine@ parameter is @redis@, the
-- @EngineVersion@ parameter is @3.2.6@, @4.x@ or later, and the cluster is
-- being created in an Amazon VPC.
--
-- If you enable in-transit encryption, you must also specify a value for
-- @CacheSubnetGroup@.
--
-- __Required:__ Only available when creating a replication group in an
-- Amazon VPC using redis version @3.2.6@, @4.x@ or later.
--
-- Default: @false@
--
-- For HIPAA compliance, you must specify @TransitEncryptionEnabled@ as
-- @true@, an @AuthToken@, and a @CacheSubnetGroup@.
createReplicationGroup_transitEncryptionEnabled :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Bool)
createReplicationGroup_transitEncryptionEnabled :: Lens' CreateReplicationGroup (Maybe Bool)
createReplicationGroup_transitEncryptionEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe Bool
transitEncryptionEnabled :: Maybe Bool
$sel:transitEncryptionEnabled:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
transitEncryptionEnabled} -> Maybe Bool
transitEncryptionEnabled) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe Bool
a -> CreateReplicationGroup
s {$sel:transitEncryptionEnabled:CreateReplicationGroup' :: Maybe Bool
transitEncryptionEnabled = Maybe Bool
a} :: CreateReplicationGroup)

-- | A setting that allows you to migrate your clients to use in-transit
-- encryption, with no downtime.
--
-- When setting @TransitEncryptionEnabled@ to @true@, you can set your
-- @TransitEncryptionMode@ to @preferred@ in the same request, to allow
-- both encrypted and unencrypted connections at the same time. Once you
-- migrate all your Redis clients to use encrypted connections you can
-- modify the value to @required@ to allow encrypted connections only.
--
-- Setting @TransitEncryptionMode@ to @required@ is a two-step process that
-- requires you to first set the @TransitEncryptionMode@ to @preferred@
-- first, after that you can set @TransitEncryptionMode@ to @required@.
createReplicationGroup_transitEncryptionMode :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe TransitEncryptionMode)
createReplicationGroup_transitEncryptionMode :: Lens' CreateReplicationGroup (Maybe TransitEncryptionMode)
createReplicationGroup_transitEncryptionMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe TransitEncryptionMode
transitEncryptionMode :: Maybe TransitEncryptionMode
$sel:transitEncryptionMode:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe TransitEncryptionMode
transitEncryptionMode} -> Maybe TransitEncryptionMode
transitEncryptionMode) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe TransitEncryptionMode
a -> CreateReplicationGroup
s {$sel:transitEncryptionMode:CreateReplicationGroup' :: Maybe TransitEncryptionMode
transitEncryptionMode = Maybe TransitEncryptionMode
a} :: CreateReplicationGroup)

-- | The user group to associate with the replication group.
createReplicationGroup_userGroupIds :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
createReplicationGroup_userGroupIds :: Lens' CreateReplicationGroup (Maybe (NonEmpty Text))
createReplicationGroup_userGroupIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Maybe (NonEmpty Text)
userGroupIds :: Maybe (NonEmpty Text)
$sel:userGroupIds:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe (NonEmpty Text)
userGroupIds} -> Maybe (NonEmpty Text)
userGroupIds) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Maybe (NonEmpty Text)
a -> CreateReplicationGroup
s {$sel:userGroupIds:CreateReplicationGroup' :: Maybe (NonEmpty Text)
userGroupIds = Maybe (NonEmpty Text)
a} :: CreateReplicationGroup) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The replication group identifier. This parameter is stored as a
-- lowercase string.
--
-- Constraints:
--
-- -   A name must contain from 1 to 40 alphanumeric characters or hyphens.
--
-- -   The first character must be a letter.
--
-- -   A name cannot end with a hyphen or contain two consecutive hyphens.
createReplicationGroup_replicationGroupId :: Lens.Lens' CreateReplicationGroup Prelude.Text
createReplicationGroup_replicationGroupId :: Lens' CreateReplicationGroup Text
createReplicationGroup_replicationGroupId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Text
replicationGroupId :: Text
$sel:replicationGroupId:CreateReplicationGroup' :: CreateReplicationGroup -> Text
replicationGroupId} -> Text
replicationGroupId) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Text
a -> CreateReplicationGroup
s {$sel:replicationGroupId:CreateReplicationGroup' :: Text
replicationGroupId = Text
a} :: CreateReplicationGroup)

-- | A user-created description for the replication group.
createReplicationGroup_replicationGroupDescription :: Lens.Lens' CreateReplicationGroup Prelude.Text
createReplicationGroup_replicationGroupDescription :: Lens' CreateReplicationGroup Text
createReplicationGroup_replicationGroupDescription = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroup' {Text
replicationGroupDescription :: Text
$sel:replicationGroupDescription:CreateReplicationGroup' :: CreateReplicationGroup -> Text
replicationGroupDescription} -> Text
replicationGroupDescription) (\s :: CreateReplicationGroup
s@CreateReplicationGroup' {} Text
a -> CreateReplicationGroup
s {$sel:replicationGroupDescription:CreateReplicationGroup' :: Text
replicationGroupDescription = Text
a} :: CreateReplicationGroup)

instance Core.AWSRequest CreateReplicationGroup where
  type
    AWSResponse CreateReplicationGroup =
      CreateReplicationGroupResponse
  request :: (Service -> Service)
-> CreateReplicationGroup -> Request CreateReplicationGroup
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateReplicationGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateReplicationGroup)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"CreateReplicationGroupResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe ReplicationGroup -> Int -> CreateReplicationGroupResponse
CreateReplicationGroupResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ReplicationGroup")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateReplicationGroup where
  hashWithSalt :: Int -> CreateReplicationGroup -> Int
hashWithSalt Int
_salt CreateReplicationGroup' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [LogDeliveryConfigurationRequest]
Maybe [NodeGroupConfiguration]
Maybe [Tag]
Maybe (NonEmpty Text)
Maybe Text
Maybe IpDiscovery
Maybe NetworkType
Maybe TransitEncryptionMode
Text
replicationGroupDescription :: Text
replicationGroupId :: Text
userGroupIds :: Maybe (NonEmpty Text)
transitEncryptionMode :: Maybe TransitEncryptionMode
transitEncryptionEnabled :: Maybe Bool
tags :: Maybe [Tag]
snapshotWindow :: Maybe Text
snapshotRetentionLimit :: Maybe Int
snapshotName :: Maybe Text
snapshotArns :: Maybe [Text]
securityGroupIds :: Maybe [Text]
replicasPerNodeGroup :: Maybe Int
primaryClusterId :: Maybe Text
preferredMaintenanceWindow :: Maybe Text
preferredCacheClusterAZs :: Maybe [Text]
port :: Maybe Int
numNodeGroups :: Maybe Int
numCacheClusters :: Maybe Int
notificationTopicArn :: Maybe Text
nodeGroupConfiguration :: Maybe [NodeGroupConfiguration]
networkType :: Maybe NetworkType
multiAZEnabled :: Maybe Bool
logDeliveryConfigurations :: Maybe [LogDeliveryConfigurationRequest]
kmsKeyId :: Maybe Text
ipDiscovery :: Maybe IpDiscovery
globalReplicationGroupId :: Maybe Text
engineVersion :: Maybe Text
engine :: Maybe Text
dataTieringEnabled :: Maybe Bool
cacheSubnetGroupName :: Maybe Text
cacheSecurityGroupNames :: Maybe [Text]
cacheParameterGroupName :: Maybe Text
cacheNodeType :: Maybe Text
automaticFailoverEnabled :: Maybe Bool
autoMinorVersionUpgrade :: Maybe Bool
authToken :: Maybe Text
atRestEncryptionEnabled :: Maybe Bool
$sel:replicationGroupDescription:CreateReplicationGroup' :: CreateReplicationGroup -> Text
$sel:replicationGroupId:CreateReplicationGroup' :: CreateReplicationGroup -> Text
$sel:userGroupIds:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe (NonEmpty Text)
$sel:transitEncryptionMode:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe TransitEncryptionMode
$sel:transitEncryptionEnabled:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
$sel:tags:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Tag]
$sel:snapshotWindow:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:snapshotRetentionLimit:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
$sel:snapshotName:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:snapshotArns:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Text]
$sel:securityGroupIds:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Text]
$sel:replicasPerNodeGroup:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
$sel:primaryClusterId:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:preferredMaintenanceWindow:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:preferredCacheClusterAZs:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Text]
$sel:port:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
$sel:numNodeGroups:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
$sel:numCacheClusters:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
$sel:notificationTopicArn:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:nodeGroupConfiguration:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [NodeGroupConfiguration]
$sel:networkType:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe NetworkType
$sel:multiAZEnabled:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
$sel:logDeliveryConfigurations:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [LogDeliveryConfigurationRequest]
$sel:kmsKeyId:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:ipDiscovery:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe IpDiscovery
$sel:globalReplicationGroupId:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:engineVersion:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:engine:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:dataTieringEnabled:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
$sel:cacheSubnetGroupName:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:cacheSecurityGroupNames:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Text]
$sel:cacheParameterGroupName:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:cacheNodeType:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:automaticFailoverEnabled:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
$sel:autoMinorVersionUpgrade:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
$sel:authToken:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:atRestEncryptionEnabled:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
atRestEncryptionEnabled
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
authToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
autoMinorVersionUpgrade
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
automaticFailoverEnabled
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cacheNodeType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cacheParameterGroupName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
cacheSecurityGroupNames
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cacheSubnetGroupName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dataTieringEnabled
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
engine
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
engineVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
globalReplicationGroupId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe IpDiscovery
ipDiscovery
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
kmsKeyId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
multiAZEnabled
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NetworkType
networkType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [NodeGroupConfiguration]
nodeGroupConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
notificationTopicArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
numCacheClusters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
numNodeGroups
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
port
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
preferredCacheClusterAZs
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
preferredMaintenanceWindow
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
primaryClusterId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
replicasPerNodeGroup
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
securityGroupIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
snapshotArns
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
snapshotName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
snapshotRetentionLimit
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
snapshotWindow
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
transitEncryptionEnabled
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TransitEncryptionMode
transitEncryptionMode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
userGroupIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
replicationGroupId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
replicationGroupDescription

instance Prelude.NFData CreateReplicationGroup where
  rnf :: CreateReplicationGroup -> ()
rnf CreateReplicationGroup' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [LogDeliveryConfigurationRequest]
Maybe [NodeGroupConfiguration]
Maybe [Tag]
Maybe (NonEmpty Text)
Maybe Text
Maybe IpDiscovery
Maybe NetworkType
Maybe TransitEncryptionMode
Text
replicationGroupDescription :: Text
replicationGroupId :: Text
userGroupIds :: Maybe (NonEmpty Text)
transitEncryptionMode :: Maybe TransitEncryptionMode
transitEncryptionEnabled :: Maybe Bool
tags :: Maybe [Tag]
snapshotWindow :: Maybe Text
snapshotRetentionLimit :: Maybe Int
snapshotName :: Maybe Text
snapshotArns :: Maybe [Text]
securityGroupIds :: Maybe [Text]
replicasPerNodeGroup :: Maybe Int
primaryClusterId :: Maybe Text
preferredMaintenanceWindow :: Maybe Text
preferredCacheClusterAZs :: Maybe [Text]
port :: Maybe Int
numNodeGroups :: Maybe Int
numCacheClusters :: Maybe Int
notificationTopicArn :: Maybe Text
nodeGroupConfiguration :: Maybe [NodeGroupConfiguration]
networkType :: Maybe NetworkType
multiAZEnabled :: Maybe Bool
logDeliveryConfigurations :: Maybe [LogDeliveryConfigurationRequest]
kmsKeyId :: Maybe Text
ipDiscovery :: Maybe IpDiscovery
globalReplicationGroupId :: Maybe Text
engineVersion :: Maybe Text
engine :: Maybe Text
dataTieringEnabled :: Maybe Bool
cacheSubnetGroupName :: Maybe Text
cacheSecurityGroupNames :: Maybe [Text]
cacheParameterGroupName :: Maybe Text
cacheNodeType :: Maybe Text
automaticFailoverEnabled :: Maybe Bool
autoMinorVersionUpgrade :: Maybe Bool
authToken :: Maybe Text
atRestEncryptionEnabled :: Maybe Bool
$sel:replicationGroupDescription:CreateReplicationGroup' :: CreateReplicationGroup -> Text
$sel:replicationGroupId:CreateReplicationGroup' :: CreateReplicationGroup -> Text
$sel:userGroupIds:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe (NonEmpty Text)
$sel:transitEncryptionMode:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe TransitEncryptionMode
$sel:transitEncryptionEnabled:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
$sel:tags:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Tag]
$sel:snapshotWindow:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:snapshotRetentionLimit:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
$sel:snapshotName:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:snapshotArns:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Text]
$sel:securityGroupIds:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Text]
$sel:replicasPerNodeGroup:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
$sel:primaryClusterId:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:preferredMaintenanceWindow:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:preferredCacheClusterAZs:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Text]
$sel:port:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
$sel:numNodeGroups:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
$sel:numCacheClusters:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
$sel:notificationTopicArn:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:nodeGroupConfiguration:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [NodeGroupConfiguration]
$sel:networkType:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe NetworkType
$sel:multiAZEnabled:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
$sel:logDeliveryConfigurations:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [LogDeliveryConfigurationRequest]
$sel:kmsKeyId:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:ipDiscovery:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe IpDiscovery
$sel:globalReplicationGroupId:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:engineVersion:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:engine:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:dataTieringEnabled:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
$sel:cacheSubnetGroupName:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:cacheSecurityGroupNames:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Text]
$sel:cacheParameterGroupName:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:cacheNodeType:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:automaticFailoverEnabled:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
$sel:autoMinorVersionUpgrade:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
$sel:authToken:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:atRestEncryptionEnabled:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
atRestEncryptionEnabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
authToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
autoMinorVersionUpgrade
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
automaticFailoverEnabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cacheNodeType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cacheParameterGroupName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
cacheSecurityGroupNames
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cacheSubnetGroupName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dataTieringEnabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
engine
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
engineVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
globalReplicationGroupId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IpDiscovery
ipDiscovery
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
kmsKeyId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
multiAZEnabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NetworkType
networkType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [NodeGroupConfiguration]
nodeGroupConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
notificationTopicArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
numCacheClusters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
numNodeGroups
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
port
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe [Text]
preferredCacheClusterAZs
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
preferredMaintenanceWindow
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
primaryClusterId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Int
replicasPerNodeGroup
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe [Text]
securityGroupIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe [Text]
snapshotArns
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
snapshotName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Int
snapshotRetentionLimit
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
snapshotWindow
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Bool
transitEncryptionEnabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe TransitEncryptionMode
transitEncryptionMode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe (NonEmpty Text)
userGroupIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Text
replicationGroupId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Text
replicationGroupDescription

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

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

instance Data.ToQuery CreateReplicationGroup where
  toQuery :: CreateReplicationGroup -> QueryString
toQuery CreateReplicationGroup' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [LogDeliveryConfigurationRequest]
Maybe [NodeGroupConfiguration]
Maybe [Tag]
Maybe (NonEmpty Text)
Maybe Text
Maybe IpDiscovery
Maybe NetworkType
Maybe TransitEncryptionMode
Text
replicationGroupDescription :: Text
replicationGroupId :: Text
userGroupIds :: Maybe (NonEmpty Text)
transitEncryptionMode :: Maybe TransitEncryptionMode
transitEncryptionEnabled :: Maybe Bool
tags :: Maybe [Tag]
snapshotWindow :: Maybe Text
snapshotRetentionLimit :: Maybe Int
snapshotName :: Maybe Text
snapshotArns :: Maybe [Text]
securityGroupIds :: Maybe [Text]
replicasPerNodeGroup :: Maybe Int
primaryClusterId :: Maybe Text
preferredMaintenanceWindow :: Maybe Text
preferredCacheClusterAZs :: Maybe [Text]
port :: Maybe Int
numNodeGroups :: Maybe Int
numCacheClusters :: Maybe Int
notificationTopicArn :: Maybe Text
nodeGroupConfiguration :: Maybe [NodeGroupConfiguration]
networkType :: Maybe NetworkType
multiAZEnabled :: Maybe Bool
logDeliveryConfigurations :: Maybe [LogDeliveryConfigurationRequest]
kmsKeyId :: Maybe Text
ipDiscovery :: Maybe IpDiscovery
globalReplicationGroupId :: Maybe Text
engineVersion :: Maybe Text
engine :: Maybe Text
dataTieringEnabled :: Maybe Bool
cacheSubnetGroupName :: Maybe Text
cacheSecurityGroupNames :: Maybe [Text]
cacheParameterGroupName :: Maybe Text
cacheNodeType :: Maybe Text
automaticFailoverEnabled :: Maybe Bool
autoMinorVersionUpgrade :: Maybe Bool
authToken :: Maybe Text
atRestEncryptionEnabled :: Maybe Bool
$sel:replicationGroupDescription:CreateReplicationGroup' :: CreateReplicationGroup -> Text
$sel:replicationGroupId:CreateReplicationGroup' :: CreateReplicationGroup -> Text
$sel:userGroupIds:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe (NonEmpty Text)
$sel:transitEncryptionMode:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe TransitEncryptionMode
$sel:transitEncryptionEnabled:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
$sel:tags:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Tag]
$sel:snapshotWindow:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:snapshotRetentionLimit:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
$sel:snapshotName:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:snapshotArns:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Text]
$sel:securityGroupIds:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Text]
$sel:replicasPerNodeGroup:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
$sel:primaryClusterId:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:preferredMaintenanceWindow:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:preferredCacheClusterAZs:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Text]
$sel:port:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
$sel:numNodeGroups:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
$sel:numCacheClusters:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
$sel:notificationTopicArn:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:nodeGroupConfiguration:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [NodeGroupConfiguration]
$sel:networkType:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe NetworkType
$sel:multiAZEnabled:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
$sel:logDeliveryConfigurations:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [LogDeliveryConfigurationRequest]
$sel:kmsKeyId:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:ipDiscovery:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe IpDiscovery
$sel:globalReplicationGroupId:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:engineVersion:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:engine:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:dataTieringEnabled:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
$sel:cacheSubnetGroupName:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:cacheSecurityGroupNames:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Text]
$sel:cacheParameterGroupName:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:cacheNodeType:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:automaticFailoverEnabled:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
$sel:autoMinorVersionUpgrade:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
$sel:authToken:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:atRestEncryptionEnabled:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"CreateReplicationGroup" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2015-02-02" :: Prelude.ByteString),
        ByteString
"AtRestEncryptionEnabled"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
atRestEncryptionEnabled,
        ByteString
"AuthToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
authToken,
        ByteString
"AutoMinorVersionUpgrade"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
autoMinorVersionUpgrade,
        ByteString
"AutomaticFailoverEnabled"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
automaticFailoverEnabled,
        ByteString
"CacheNodeType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
cacheNodeType,
        ByteString
"CacheParameterGroupName"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
cacheParameterGroupName,
        ByteString
"CacheSecurityGroupNames"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"CacheSecurityGroupName"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
cacheSecurityGroupNames
            ),
        ByteString
"CacheSubnetGroupName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
cacheSubnetGroupName,
        ByteString
"DataTieringEnabled" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
dataTieringEnabled,
        ByteString
"Engine" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
engine,
        ByteString
"EngineVersion" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
engineVersion,
        ByteString
"GlobalReplicationGroupId"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
globalReplicationGroupId,
        ByteString
"IpDiscovery" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe IpDiscovery
ipDiscovery,
        ByteString
"KmsKeyId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
kmsKeyId,
        ByteString
"LogDeliveryConfigurations"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"LogDeliveryConfigurationRequest"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations
            ),
        ByteString
"MultiAZEnabled" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
multiAZEnabled,
        ByteString
"NetworkType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe NetworkType
networkType,
        ByteString
"NodeGroupConfiguration"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"NodeGroupConfiguration"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [NodeGroupConfiguration]
nodeGroupConfiguration
            ),
        ByteString
"NotificationTopicArn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
notificationTopicArn,
        ByteString
"NumCacheClusters" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
numCacheClusters,
        ByteString
"NumNodeGroups" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
numNodeGroups,
        ByteString
"Port" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
port,
        ByteString
"PreferredCacheClusterAZs"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"AvailabilityZone"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
preferredCacheClusterAZs
            ),
        ByteString
"PreferredMaintenanceWindow"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
preferredMaintenanceWindow,
        ByteString
"PrimaryClusterId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
primaryClusterId,
        ByteString
"ReplicasPerNodeGroup" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
replicasPerNodeGroup,
        ByteString
"SecurityGroupIds"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"SecurityGroupId"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
securityGroupIds
            ),
        ByteString
"SnapshotArns"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"SnapshotArn"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
snapshotArns
            ),
        ByteString
"SnapshotName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
snapshotName,
        ByteString
"SnapshotRetentionLimit"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
snapshotRetentionLimit,
        ByteString
"SnapshotWindow" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
snapshotWindow,
        ByteString
"Tags"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"Tag" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
        ByteString
"TransitEncryptionEnabled"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
transitEncryptionEnabled,
        ByteString
"TransitEncryptionMode"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe TransitEncryptionMode
transitEncryptionMode,
        ByteString
"UserGroupIds"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
userGroupIds),
        ByteString
"ReplicationGroupId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
replicationGroupId,
        ByteString
"ReplicationGroupDescription"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
replicationGroupDescription
      ]

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

-- |
-- Create a value of 'CreateReplicationGroupResponse' 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:
--
-- 'replicationGroup', 'createReplicationGroupResponse_replicationGroup' - Undocumented member.
--
-- 'httpStatus', 'createReplicationGroupResponse_httpStatus' - The response's http status code.
newCreateReplicationGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateReplicationGroupResponse
newCreateReplicationGroupResponse :: Int -> CreateReplicationGroupResponse
newCreateReplicationGroupResponse Int
pHttpStatus_ =
  CreateReplicationGroupResponse'
    { $sel:replicationGroup:CreateReplicationGroupResponse' :: Maybe ReplicationGroup
replicationGroup =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateReplicationGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
createReplicationGroupResponse_replicationGroup :: Lens.Lens' CreateReplicationGroupResponse (Prelude.Maybe ReplicationGroup)
createReplicationGroupResponse_replicationGroup :: Lens' CreateReplicationGroupResponse (Maybe ReplicationGroup)
createReplicationGroupResponse_replicationGroup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationGroupResponse' {Maybe ReplicationGroup
replicationGroup :: Maybe ReplicationGroup
$sel:replicationGroup:CreateReplicationGroupResponse' :: CreateReplicationGroupResponse -> Maybe ReplicationGroup
replicationGroup} -> Maybe ReplicationGroup
replicationGroup) (\s :: CreateReplicationGroupResponse
s@CreateReplicationGroupResponse' {} Maybe ReplicationGroup
a -> CreateReplicationGroupResponse
s {$sel:replicationGroup:CreateReplicationGroupResponse' :: Maybe ReplicationGroup
replicationGroup = Maybe ReplicationGroup
a} :: CreateReplicationGroupResponse)

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

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