{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a 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_automaticFailoverEnabled,
    createReplicationGroup_engineVersion,
    createReplicationGroup_cacheNodeType,
    createReplicationGroup_nodeGroupConfiguration,
    createReplicationGroup_atRestEncryptionEnabled,
    createReplicationGroup_securityGroupIds,
    createReplicationGroup_snapshotArns,
    createReplicationGroup_autoMinorVersionUpgrade,
    createReplicationGroup_cacheParameterGroupName,
    createReplicationGroup_transitEncryptionEnabled,
    createReplicationGroup_userGroupIds,
    createReplicationGroup_snapshotWindow,
    createReplicationGroup_logDeliveryConfigurations,
    createReplicationGroup_authToken,
    createReplicationGroup_primaryClusterId,
    createReplicationGroup_engine,
    createReplicationGroup_preferredMaintenanceWindow,
    createReplicationGroup_kmsKeyId,
    createReplicationGroup_multiAZEnabled,
    createReplicationGroup_cacheSubnetGroupName,
    createReplicationGroup_numNodeGroups,
    createReplicationGroup_snapshotRetentionLimit,
    createReplicationGroup_globalReplicationGroupId,
    createReplicationGroup_replicasPerNodeGroup,
    createReplicationGroup_numCacheClusters,
    createReplicationGroup_preferredCacheClusterAZs,
    createReplicationGroup_snapshotName,
    createReplicationGroup_notificationTopicArn,
    createReplicationGroup_tags,
    createReplicationGroup_port,
    createReplicationGroup_cacheSecurityGroupNames,
    createReplicationGroup_replicationGroupId,
    createReplicationGroup_replicationGroupDescription,

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

    -- * Response Lenses
    createReplicationGroupResponse_replicationGroup,
    createReplicationGroupResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.ElastiCache.Types
import qualified Amazonka.Lens as Lens
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'
  { -- | 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 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 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@
    --
    --         __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)
    --
    --         __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)
    --
    --         __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)
    --
    --         __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,
    -- | 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],
    -- | 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,
    -- | 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],
    -- | This parameter is currently disabled.
    CreateReplicationGroup -> Maybe Bool
autoMinorVersionUpgrade :: Prelude.Maybe Prelude.Bool,
    -- | 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 flag that enables in-transit encryption when set to @true@.
    --
    -- You cannot modify the value of @TransitEncryptionEnabled@ after the
    -- cluster is created. To enable in-transit encryption on a cluster you
    -- must set @TransitEncryptionEnabled@ to @true@ when you create a cluster.
    --
    -- 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,
    -- | The user group to associate with the replication group.
    CreateReplicationGroup -> Maybe (NonEmpty Text)
userGroupIds :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | 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,
    -- | Specifies the destination, format and type of the logs.
    CreateReplicationGroup -> Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations :: Prelude.Maybe [LogDeliveryConfigurationRequest],
    -- | __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,
    -- | 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,
    -- | The name of the cache engine to be used for the clusters in this
    -- replication group. Must be Redis.
    CreateReplicationGroup -> Maybe Text
engine :: 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 ID of the KMS key used to encrypt the disk in the cluster.
    CreateReplicationGroup -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | 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,
    -- | 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,
    -- | 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 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 name of the Global datastore
    CreateReplicationGroup -> Maybe Text
globalReplicationGroupId :: 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,
    -- | 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,
    -- | 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],
    -- | 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 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,
    -- | 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],
    -- | The port number on which each member of the replication group accepts
    -- connections.
    CreateReplicationGroup -> Maybe Int
port :: Prelude.Maybe Prelude.Int,
    -- | A list of cache security group names to associate with this replication
    -- group.
    CreateReplicationGroup -> Maybe [Text]
cacheSecurityGroupNames :: Prelude.Maybe [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
(CreateReplicationGroup -> CreateReplicationGroup -> Bool)
-> (CreateReplicationGroup -> CreateReplicationGroup -> Bool)
-> Eq CreateReplicationGroup
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]
(Int -> ReadS CreateReplicationGroup)
-> ReadS [CreateReplicationGroup]
-> ReadPrec CreateReplicationGroup
-> ReadPrec [CreateReplicationGroup]
-> Read 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
(Int -> CreateReplicationGroup -> ShowS)
-> (CreateReplicationGroup -> String)
-> ([CreateReplicationGroup] -> ShowS)
-> Show CreateReplicationGroup
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. CreateReplicationGroup -> Rep CreateReplicationGroup x)
-> (forall x.
    Rep CreateReplicationGroup x -> CreateReplicationGroup)
-> Generic CreateReplicationGroup
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:
--
-- '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
--
-- '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.
--
-- '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@
--
--         __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)
--
--         __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)
--
--         __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)
--
--         __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.
--
-- '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.
--
-- '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@
--
-- '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@
--
-- 'autoMinorVersionUpgrade', 'createReplicationGroup_autoMinorVersionUpgrade' - This parameter is currently disabled.
--
-- '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@.
--
-- 'transitEncryptionEnabled', 'createReplicationGroup_transitEncryptionEnabled' - A flag that enables in-transit encryption when set to @true@.
--
-- You cannot modify the value of @TransitEncryptionEnabled@ after the
-- cluster is created. To enable in-transit encryption on a cluster you
-- must set @TransitEncryptionEnabled@ to @true@ when you create a cluster.
--
-- 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@.
--
-- 'userGroupIds', 'createReplicationGroup_userGroupIds' - The user group to associate with the replication group.
--
-- '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.
--
-- 'logDeliveryConfigurations', 'createReplicationGroup_logDeliveryConfigurations' - Specifies the destination, format and type of the logs.
--
-- '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.
--
-- '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.
--
-- 'engine', 'createReplicationGroup_engine' - The name of the cache engine to be used for the clusters in this
-- replication group. Must be Redis.
--
-- '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@
--
-- 'kmsKeyId', 'createReplicationGroup_kmsKeyId' - The ID of the KMS key used to encrypt the disk in the cluster.
--
-- '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>.
--
-- '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>.
--
-- '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
--
-- '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).
--
-- 'globalReplicationGroupId', 'createReplicationGroup_globalReplicationGroupId' - The name of the Global datastore
--
-- 'replicasPerNodeGroup', 'createReplicationGroup_replicasPerNodeGroup' - An optional parameter that specifies the number of replica nodes in each
-- node group (shard). Valid values are 0 to 5.
--
-- '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).
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- 'port', 'createReplicationGroup_port' - The port number on which each member of the replication group accepts
-- connections.
--
-- 'cacheSecurityGroupNames', 'createReplicationGroup_cacheSecurityGroupNames' - A list of cache security group names to associate with this 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' :: Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [NodeGroupConfiguration]
-> Maybe Bool
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe [LogDeliveryConfigurationRequest]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Maybe Int
-> Maybe [Text]
-> Text
-> Text
-> CreateReplicationGroup
CreateReplicationGroup'
      { $sel:automaticFailoverEnabled:CreateReplicationGroup' :: Maybe Bool
automaticFailoverEnabled =
          Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:engineVersion:CreateReplicationGroup' :: Maybe Text
engineVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:cacheNodeType:CreateReplicationGroup' :: Maybe Text
cacheNodeType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:nodeGroupConfiguration:CreateReplicationGroup' :: Maybe [NodeGroupConfiguration]
nodeGroupConfiguration = Maybe [NodeGroupConfiguration]
forall a. Maybe a
Prelude.Nothing,
        $sel:atRestEncryptionEnabled:CreateReplicationGroup' :: Maybe Bool
atRestEncryptionEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:securityGroupIds:CreateReplicationGroup' :: Maybe [Text]
securityGroupIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:snapshotArns:CreateReplicationGroup' :: Maybe [Text]
snapshotArns = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:autoMinorVersionUpgrade:CreateReplicationGroup' :: Maybe Bool
autoMinorVersionUpgrade = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:cacheParameterGroupName:CreateReplicationGroup' :: Maybe Text
cacheParameterGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:transitEncryptionEnabled:CreateReplicationGroup' :: Maybe Bool
transitEncryptionEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:userGroupIds:CreateReplicationGroup' :: Maybe (NonEmpty Text)
userGroupIds = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:snapshotWindow:CreateReplicationGroup' :: Maybe Text
snapshotWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:logDeliveryConfigurations:CreateReplicationGroup' :: Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations = Maybe [LogDeliveryConfigurationRequest]
forall a. Maybe a
Prelude.Nothing,
        $sel:authToken:CreateReplicationGroup' :: Maybe Text
authToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:primaryClusterId:CreateReplicationGroup' :: Maybe Text
primaryClusterId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:engine:CreateReplicationGroup' :: Maybe Text
engine = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:preferredMaintenanceWindow:CreateReplicationGroup' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:kmsKeyId:CreateReplicationGroup' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:multiAZEnabled:CreateReplicationGroup' :: Maybe Bool
multiAZEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:cacheSubnetGroupName:CreateReplicationGroup' :: Maybe Text
cacheSubnetGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:numNodeGroups:CreateReplicationGroup' :: Maybe Int
numNodeGroups = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:snapshotRetentionLimit:CreateReplicationGroup' :: Maybe Int
snapshotRetentionLimit = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:globalReplicationGroupId:CreateReplicationGroup' :: Maybe Text
globalReplicationGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:replicasPerNodeGroup:CreateReplicationGroup' :: Maybe Int
replicasPerNodeGroup = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:numCacheClusters:CreateReplicationGroup' :: Maybe Int
numCacheClusters = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:preferredCacheClusterAZs:CreateReplicationGroup' :: Maybe [Text]
preferredCacheClusterAZs = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:snapshotName:CreateReplicationGroup' :: Maybe Text
snapshotName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:notificationTopicArn:CreateReplicationGroup' :: Maybe Text
notificationTopicArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateReplicationGroup' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:port:CreateReplicationGroup' :: Maybe Int
port = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:cacheSecurityGroupNames:CreateReplicationGroup' :: Maybe [Text]
cacheSecurityGroupNames = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:replicationGroupId:CreateReplicationGroup' :: Text
replicationGroupId = Text
pReplicationGroupId_,
        $sel:replicationGroupDescription:CreateReplicationGroup' :: Text
replicationGroupDescription =
          Text
pReplicationGroupDescription_
      }

-- | 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 :: (Maybe Bool -> f (Maybe Bool))
-> CreateReplicationGroup -> f CreateReplicationGroup
createReplicationGroup_automaticFailoverEnabled = (CreateReplicationGroup -> Maybe Bool)
-> (CreateReplicationGroup -> Maybe Bool -> CreateReplicationGroup)
-> Lens
     CreateReplicationGroup
     CreateReplicationGroup
     (Maybe Bool)
     (Maybe Bool)
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 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 :: (Maybe Text -> f (Maybe Text))
-> CreateReplicationGroup -> f CreateReplicationGroup
createReplicationGroup_engineVersion = (CreateReplicationGroup -> Maybe Text)
-> (CreateReplicationGroup -> Maybe Text -> CreateReplicationGroup)
-> Lens
     CreateReplicationGroup
     CreateReplicationGroup
     (Maybe Text)
     (Maybe Text)
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 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@
--
--         __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)
--
--         __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)
--
--         __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)
--
--         __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 :: (Maybe Text -> f (Maybe Text))
-> CreateReplicationGroup -> f CreateReplicationGroup
createReplicationGroup_cacheNodeType = (CreateReplicationGroup -> Maybe Text)
-> (CreateReplicationGroup -> Maybe Text -> CreateReplicationGroup)
-> Lens
     CreateReplicationGroup
     CreateReplicationGroup
     (Maybe Text)
     (Maybe Text)
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)

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

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

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

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

-- | This parameter is currently disabled.
createReplicationGroup_autoMinorVersionUpgrade :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Bool)
createReplicationGroup_autoMinorVersionUpgrade :: (Maybe Bool -> f (Maybe Bool))
-> CreateReplicationGroup -> f CreateReplicationGroup
createReplicationGroup_autoMinorVersionUpgrade = (CreateReplicationGroup -> Maybe Bool)
-> (CreateReplicationGroup -> Maybe Bool -> CreateReplicationGroup)
-> Lens
     CreateReplicationGroup
     CreateReplicationGroup
     (Maybe Bool)
     (Maybe Bool)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> CreateReplicationGroup -> f CreateReplicationGroup
createReplicationGroup_cacheParameterGroupName = (CreateReplicationGroup -> Maybe Text)
-> (CreateReplicationGroup -> Maybe Text -> CreateReplicationGroup)
-> Lens
     CreateReplicationGroup
     CreateReplicationGroup
     (Maybe Text)
     (Maybe Text)
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 flag that enables in-transit encryption when set to @true@.
--
-- You cannot modify the value of @TransitEncryptionEnabled@ after the
-- cluster is created. To enable in-transit encryption on a cluster you
-- must set @TransitEncryptionEnabled@ to @true@ when you create a cluster.
--
-- 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 :: (Maybe Bool -> f (Maybe Bool))
-> CreateReplicationGroup -> f CreateReplicationGroup
createReplicationGroup_transitEncryptionEnabled = (CreateReplicationGroup -> Maybe Bool)
-> (CreateReplicationGroup -> Maybe Bool -> CreateReplicationGroup)
-> Lens
     CreateReplicationGroup
     CreateReplicationGroup
     (Maybe Bool)
     (Maybe Bool)
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)

-- | The user group to associate with the replication group.
createReplicationGroup_userGroupIds :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
createReplicationGroup_userGroupIds :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreateReplicationGroup -> f CreateReplicationGroup
createReplicationGroup_userGroupIds = (CreateReplicationGroup -> Maybe (NonEmpty Text))
-> (CreateReplicationGroup
    -> Maybe (NonEmpty Text) -> CreateReplicationGroup)
-> Lens
     CreateReplicationGroup
     CreateReplicationGroup
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
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) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> CreateReplicationGroup -> f CreateReplicationGroup)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreateReplicationGroup
-> f CreateReplicationGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | Specifies the destination, format and type of the logs.
createReplicationGroup_logDeliveryConfigurations :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe [LogDeliveryConfigurationRequest])
createReplicationGroup_logDeliveryConfigurations :: (Maybe [LogDeliveryConfigurationRequest]
 -> f (Maybe [LogDeliveryConfigurationRequest]))
-> CreateReplicationGroup -> f CreateReplicationGroup
createReplicationGroup_logDeliveryConfigurations = (CreateReplicationGroup -> Maybe [LogDeliveryConfigurationRequest])
-> (CreateReplicationGroup
    -> Maybe [LogDeliveryConfigurationRequest]
    -> CreateReplicationGroup)
-> Lens
     CreateReplicationGroup
     CreateReplicationGroup
     (Maybe [LogDeliveryConfigurationRequest])
     (Maybe [LogDeliveryConfigurationRequest])
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) ((Maybe [LogDeliveryConfigurationRequest]
  -> f (Maybe [LogDeliveryConfigurationRequest]))
 -> CreateReplicationGroup -> f CreateReplicationGroup)
-> ((Maybe [LogDeliveryConfigurationRequest]
     -> f (Maybe [LogDeliveryConfigurationRequest]))
    -> Maybe [LogDeliveryConfigurationRequest]
    -> f (Maybe [LogDeliveryConfigurationRequest]))
-> (Maybe [LogDeliveryConfigurationRequest]
    -> f (Maybe [LogDeliveryConfigurationRequest]))
-> CreateReplicationGroup
-> f CreateReplicationGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [LogDeliveryConfigurationRequest]
  [LogDeliveryConfigurationRequest]
  [LogDeliveryConfigurationRequest]
  [LogDeliveryConfigurationRequest]
-> Iso
     (Maybe [LogDeliveryConfigurationRequest])
     (Maybe [LogDeliveryConfigurationRequest])
     (Maybe [LogDeliveryConfigurationRequest])
     (Maybe [LogDeliveryConfigurationRequest])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [LogDeliveryConfigurationRequest]
  [LogDeliveryConfigurationRequest]
  [LogDeliveryConfigurationRequest]
  [LogDeliveryConfigurationRequest]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | __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 :: (Maybe Text -> f (Maybe Text))
-> CreateReplicationGroup -> f CreateReplicationGroup
createReplicationGroup_authToken = (CreateReplicationGroup -> Maybe Text)
-> (CreateReplicationGroup -> Maybe Text -> CreateReplicationGroup)
-> Lens
     CreateReplicationGroup
     CreateReplicationGroup
     (Maybe Text)
     (Maybe Text)
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)

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

-- | The name of the cache engine to be used for the clusters in this
-- replication group. Must be Redis.
createReplicationGroup_engine :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Text)
createReplicationGroup_engine :: (Maybe Text -> f (Maybe Text))
-> CreateReplicationGroup -> f CreateReplicationGroup
createReplicationGroup_engine = (CreateReplicationGroup -> Maybe Text)
-> (CreateReplicationGroup -> Maybe Text -> CreateReplicationGroup)
-> Lens
     CreateReplicationGroup
     CreateReplicationGroup
     (Maybe Text)
     (Maybe Text)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> CreateReplicationGroup -> f CreateReplicationGroup
createReplicationGroup_preferredMaintenanceWindow = (CreateReplicationGroup -> Maybe Text)
-> (CreateReplicationGroup -> Maybe Text -> CreateReplicationGroup)
-> Lens
     CreateReplicationGroup
     CreateReplicationGroup
     (Maybe Text)
     (Maybe Text)
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 ID of the KMS key used to encrypt the disk in the cluster.
createReplicationGroup_kmsKeyId :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Text)
createReplicationGroup_kmsKeyId :: (Maybe Text -> f (Maybe Text))
-> CreateReplicationGroup -> f CreateReplicationGroup
createReplicationGroup_kmsKeyId = (CreateReplicationGroup -> Maybe Text)
-> (CreateReplicationGroup -> Maybe Text -> CreateReplicationGroup)
-> Lens
     CreateReplicationGroup
     CreateReplicationGroup
     (Maybe Text)
     (Maybe Text)
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)

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

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

-- | 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 :: (Maybe Int -> f (Maybe Int))
-> CreateReplicationGroup -> f CreateReplicationGroup
createReplicationGroup_numNodeGroups = (CreateReplicationGroup -> Maybe Int)
-> (CreateReplicationGroup -> Maybe Int -> CreateReplicationGroup)
-> Lens
     CreateReplicationGroup
     CreateReplicationGroup
     (Maybe Int)
     (Maybe Int)
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 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 :: (Maybe Int -> f (Maybe Int))
-> CreateReplicationGroup -> f CreateReplicationGroup
createReplicationGroup_snapshotRetentionLimit = (CreateReplicationGroup -> Maybe Int)
-> (CreateReplicationGroup -> Maybe Int -> CreateReplicationGroup)
-> Lens
     CreateReplicationGroup
     CreateReplicationGroup
     (Maybe Int)
     (Maybe Int)
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 name of the Global datastore
createReplicationGroup_globalReplicationGroupId :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Text)
createReplicationGroup_globalReplicationGroupId :: (Maybe Text -> f (Maybe Text))
-> CreateReplicationGroup -> f CreateReplicationGroup
createReplicationGroup_globalReplicationGroupId = (CreateReplicationGroup -> Maybe Text)
-> (CreateReplicationGroup -> Maybe Text -> CreateReplicationGroup)
-> Lens
     CreateReplicationGroup
     CreateReplicationGroup
     (Maybe Text)
     (Maybe Text)
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)

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

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

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

-- | The name 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 :: (Maybe Text -> f (Maybe Text))
-> CreateReplicationGroup -> f CreateReplicationGroup
createReplicationGroup_snapshotName = (CreateReplicationGroup -> Maybe Text)
-> (CreateReplicationGroup -> Maybe Text -> CreateReplicationGroup)
-> Lens
     CreateReplicationGroup
     CreateReplicationGroup
     (Maybe Text)
     (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text))
-> CreateReplicationGroup -> f CreateReplicationGroup
createReplicationGroup_notificationTopicArn = (CreateReplicationGroup -> Maybe Text)
-> (CreateReplicationGroup -> Maybe Text -> CreateReplicationGroup)
-> Lens
     CreateReplicationGroup
     CreateReplicationGroup
     (Maybe Text)
     (Maybe Text)
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)

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

-- | The port number on which each member of the replication group accepts
-- connections.
createReplicationGroup_port :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe Prelude.Int)
createReplicationGroup_port :: (Maybe Int -> f (Maybe Int))
-> CreateReplicationGroup -> f CreateReplicationGroup
createReplicationGroup_port = (CreateReplicationGroup -> Maybe Int)
-> (CreateReplicationGroup -> Maybe Int -> CreateReplicationGroup)
-> Lens
     CreateReplicationGroup
     CreateReplicationGroup
     (Maybe Int)
     (Maybe Int)
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 cache security group names to associate with this replication
-- group.
createReplicationGroup_cacheSecurityGroupNames :: Lens.Lens' CreateReplicationGroup (Prelude.Maybe [Prelude.Text])
createReplicationGroup_cacheSecurityGroupNames :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateReplicationGroup -> f CreateReplicationGroup
createReplicationGroup_cacheSecurityGroupNames = (CreateReplicationGroup -> Maybe [Text])
-> (CreateReplicationGroup
    -> Maybe [Text] -> CreateReplicationGroup)
-> Lens
     CreateReplicationGroup
     CreateReplicationGroup
     (Maybe [Text])
     (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateReplicationGroup -> f CreateReplicationGroup)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateReplicationGroup
-> f CreateReplicationGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The 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 :: (Text -> f Text)
-> CreateReplicationGroup -> f CreateReplicationGroup
createReplicationGroup_replicationGroupId = (CreateReplicationGroup -> Text)
-> (CreateReplicationGroup -> Text -> CreateReplicationGroup)
-> Lens CreateReplicationGroup CreateReplicationGroup Text Text
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 :: (Text -> f Text)
-> CreateReplicationGroup -> f CreateReplicationGroup
createReplicationGroup_replicationGroupDescription = (CreateReplicationGroup -> Text)
-> (CreateReplicationGroup -> Text -> CreateReplicationGroup)
-> Lens CreateReplicationGroup CreateReplicationGroup Text Text
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 :: CreateReplicationGroup -> Request CreateReplicationGroup
request = Service -> CreateReplicationGroup -> Request CreateReplicationGroup
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateReplicationGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateReplicationGroup)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse CreateReplicationGroup))
-> Logger
-> Service
-> Proxy CreateReplicationGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateReplicationGroup)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"CreateReplicationGroupResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe ReplicationGroup -> Int -> CreateReplicationGroupResponse
CreateReplicationGroupResponse'
            (Maybe ReplicationGroup -> Int -> CreateReplicationGroupResponse)
-> Either String (Maybe ReplicationGroup)
-> Either String (Int -> CreateReplicationGroupResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe ReplicationGroup)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ReplicationGroup")
            Either String (Int -> CreateReplicationGroupResponse)
-> Either String Int
-> Either String CreateReplicationGroupResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateReplicationGroup

instance Prelude.NFData CreateReplicationGroup

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

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

instance Core.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
Text
replicationGroupDescription :: Text
replicationGroupId :: Text
cacheSecurityGroupNames :: Maybe [Text]
port :: Maybe Int
tags :: Maybe [Tag]
notificationTopicArn :: Maybe Text
snapshotName :: Maybe Text
preferredCacheClusterAZs :: Maybe [Text]
numCacheClusters :: Maybe Int
replicasPerNodeGroup :: Maybe Int
globalReplicationGroupId :: Maybe Text
snapshotRetentionLimit :: Maybe Int
numNodeGroups :: Maybe Int
cacheSubnetGroupName :: Maybe Text
multiAZEnabled :: Maybe Bool
kmsKeyId :: Maybe Text
preferredMaintenanceWindow :: Maybe Text
engine :: Maybe Text
primaryClusterId :: Maybe Text
authToken :: Maybe Text
logDeliveryConfigurations :: Maybe [LogDeliveryConfigurationRequest]
snapshotWindow :: Maybe Text
userGroupIds :: Maybe (NonEmpty Text)
transitEncryptionEnabled :: Maybe Bool
cacheParameterGroupName :: Maybe Text
autoMinorVersionUpgrade :: Maybe Bool
snapshotArns :: Maybe [Text]
securityGroupIds :: Maybe [Text]
atRestEncryptionEnabled :: Maybe Bool
nodeGroupConfiguration :: Maybe [NodeGroupConfiguration]
cacheNodeType :: Maybe Text
engineVersion :: Maybe Text
automaticFailoverEnabled :: Maybe Bool
$sel:replicationGroupDescription:CreateReplicationGroup' :: CreateReplicationGroup -> Text
$sel:replicationGroupId:CreateReplicationGroup' :: CreateReplicationGroup -> Text
$sel:cacheSecurityGroupNames:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Text]
$sel:port:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
$sel:tags:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Tag]
$sel:notificationTopicArn:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:snapshotName:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:preferredCacheClusterAZs:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Text]
$sel:numCacheClusters:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
$sel:replicasPerNodeGroup:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
$sel:globalReplicationGroupId:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:snapshotRetentionLimit:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
$sel:numNodeGroups:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Int
$sel:cacheSubnetGroupName:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:multiAZEnabled:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
$sel:kmsKeyId:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:preferredMaintenanceWindow:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:engine:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:primaryClusterId:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:authToken:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:logDeliveryConfigurations:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [LogDeliveryConfigurationRequest]
$sel:snapshotWindow:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:userGroupIds:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe (NonEmpty Text)
$sel:transitEncryptionEnabled:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
$sel:cacheParameterGroupName:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:autoMinorVersionUpgrade:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
$sel:snapshotArns:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Text]
$sel:securityGroupIds:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [Text]
$sel:atRestEncryptionEnabled:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
$sel:nodeGroupConfiguration:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe [NodeGroupConfiguration]
$sel:cacheNodeType:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:engineVersion:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Text
$sel:automaticFailoverEnabled:CreateReplicationGroup' :: CreateReplicationGroup -> Maybe Bool
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"CreateReplicationGroup" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2015-02-02" :: Prelude.ByteString),
        ByteString
"AutomaticFailoverEnabled"
          ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
automaticFailoverEnabled,
        ByteString
"EngineVersion" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
engineVersion,
        ByteString
"CacheNodeType" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
cacheNodeType,
        ByteString
"NodeGroupConfiguration"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [NodeGroupConfiguration] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"NodeGroupConfiguration"
                ([NodeGroupConfiguration] -> QueryString)
-> Maybe [NodeGroupConfiguration] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [NodeGroupConfiguration]
nodeGroupConfiguration
            ),
        ByteString
"AtRestEncryptionEnabled"
          ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
atRestEncryptionEnabled,
        ByteString
"SecurityGroupIds"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"SecurityGroupId"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
securityGroupIds
            ),
        ByteString
"SnapshotArns"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"SnapshotArn"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
snapshotArns
            ),
        ByteString
"AutoMinorVersionUpgrade"
          ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
autoMinorVersionUpgrade,
        ByteString
"CacheParameterGroupName"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
cacheParameterGroupName,
        ByteString
"TransitEncryptionEnabled"
          ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
transitEncryptionEnabled,
        ByteString
"UserGroupIds"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> NonEmpty Text -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" (NonEmpty Text -> QueryString)
-> Maybe (NonEmpty Text) -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
userGroupIds),
        ByteString
"SnapshotWindow" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
snapshotWindow,
        ByteString
"LogDeliveryConfigurations"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [LogDeliveryConfigurationRequest] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"LogDeliveryConfigurationRequest"
                ([LogDeliveryConfigurationRequest] -> QueryString)
-> Maybe [LogDeliveryConfigurationRequest] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations
            ),
        ByteString
"AuthToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
authToken,
        ByteString
"PrimaryClusterId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
primaryClusterId,
        ByteString
"Engine" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
engine,
        ByteString
"PreferredMaintenanceWindow"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
preferredMaintenanceWindow,
        ByteString
"KmsKeyId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
kmsKeyId,
        ByteString
"MultiAZEnabled" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
multiAZEnabled,
        ByteString
"CacheSubnetGroupName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
cacheSubnetGroupName,
        ByteString
"NumNodeGroups" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
numNodeGroups,
        ByteString
"SnapshotRetentionLimit"
          ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
snapshotRetentionLimit,
        ByteString
"GlobalReplicationGroupId"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
globalReplicationGroupId,
        ByteString
"ReplicasPerNodeGroup" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
replicasPerNodeGroup,
        ByteString
"NumCacheClusters" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
numCacheClusters,
        ByteString
"PreferredCacheClusterAZs"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"AvailabilityZone"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
preferredCacheClusterAZs
            ),
        ByteString
"SnapshotName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
snapshotName,
        ByteString
"NotificationTopicArn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
notificationTopicArn,
        ByteString
"Tags"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [Tag] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"Tag" ([Tag] -> QueryString) -> Maybe [Tag] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
        ByteString
"Port" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
port,
        ByteString
"CacheSecurityGroupNames"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"CacheSecurityGroupName"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
cacheSecurityGroupNames
            ),
        ByteString
"ReplicationGroupId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
replicationGroupId,
        ByteString
"ReplicationGroupDescription"
          ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: 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
(CreateReplicationGroupResponse
 -> CreateReplicationGroupResponse -> Bool)
-> (CreateReplicationGroupResponse
    -> CreateReplicationGroupResponse -> Bool)
-> Eq CreateReplicationGroupResponse
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]
(Int -> ReadS CreateReplicationGroupResponse)
-> ReadS [CreateReplicationGroupResponse]
-> ReadPrec CreateReplicationGroupResponse
-> ReadPrec [CreateReplicationGroupResponse]
-> Read 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
(Int -> CreateReplicationGroupResponse -> ShowS)
-> (CreateReplicationGroupResponse -> String)
-> ([CreateReplicationGroupResponse] -> ShowS)
-> Show CreateReplicationGroupResponse
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.
 CreateReplicationGroupResponse
 -> Rep CreateReplicationGroupResponse x)
-> (forall x.
    Rep CreateReplicationGroupResponse x
    -> CreateReplicationGroupResponse)
-> Generic CreateReplicationGroupResponse
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' :: Maybe ReplicationGroup -> Int -> CreateReplicationGroupResponse
CreateReplicationGroupResponse'
    { $sel:replicationGroup:CreateReplicationGroupResponse' :: Maybe ReplicationGroup
replicationGroup =
        Maybe 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 :: (Maybe ReplicationGroup -> f (Maybe ReplicationGroup))
-> CreateReplicationGroupResponse
-> f CreateReplicationGroupResponse
createReplicationGroupResponse_replicationGroup = (CreateReplicationGroupResponse -> Maybe ReplicationGroup)
-> (CreateReplicationGroupResponse
    -> Maybe ReplicationGroup -> CreateReplicationGroupResponse)
-> Lens
     CreateReplicationGroupResponse
     CreateReplicationGroupResponse
     (Maybe ReplicationGroup)
     (Maybe 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 :: (Int -> f Int)
-> CreateReplicationGroupResponse
-> f CreateReplicationGroupResponse
createReplicationGroupResponse_httpStatus = (CreateReplicationGroupResponse -> Int)
-> (CreateReplicationGroupResponse
    -> Int -> CreateReplicationGroupResponse)
-> Lens
     CreateReplicationGroupResponse
     CreateReplicationGroupResponse
     Int
     Int
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