{-# 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.CreateCacheCluster
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a cluster. All nodes in the cluster run the same
-- protocol-compliant cache engine software, either Memcached or Redis.
--
-- This operation is not supported for Redis (cluster mode enabled)
-- clusters.
module Amazonka.ElastiCache.CreateCacheCluster
  ( -- * Creating a Request
    CreateCacheCluster (..),
    newCreateCacheCluster,

    -- * Request Lenses
    createCacheCluster_aZMode,
    createCacheCluster_authToken,
    createCacheCluster_autoMinorVersionUpgrade,
    createCacheCluster_cacheNodeType,
    createCacheCluster_cacheParameterGroupName,
    createCacheCluster_cacheSecurityGroupNames,
    createCacheCluster_cacheSubnetGroupName,
    createCacheCluster_engine,
    createCacheCluster_engineVersion,
    createCacheCluster_ipDiscovery,
    createCacheCluster_logDeliveryConfigurations,
    createCacheCluster_networkType,
    createCacheCluster_notificationTopicArn,
    createCacheCluster_numCacheNodes,
    createCacheCluster_outpostMode,
    createCacheCluster_port,
    createCacheCluster_preferredAvailabilityZone,
    createCacheCluster_preferredAvailabilityZones,
    createCacheCluster_preferredMaintenanceWindow,
    createCacheCluster_preferredOutpostArn,
    createCacheCluster_preferredOutpostArns,
    createCacheCluster_replicationGroupId,
    createCacheCluster_securityGroupIds,
    createCacheCluster_snapshotArns,
    createCacheCluster_snapshotName,
    createCacheCluster_snapshotRetentionLimit,
    createCacheCluster_snapshotWindow,
    createCacheCluster_tags,
    createCacheCluster_transitEncryptionEnabled,
    createCacheCluster_cacheClusterId,

    -- * Destructuring the Response
    CreateCacheClusterResponse (..),
    newCreateCacheClusterResponse,

    -- * Response Lenses
    createCacheClusterResponse_cacheCluster,
    createCacheClusterResponse_httpStatus,
  )
where

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

-- | Represents the input of a CreateCacheCluster operation.
--
-- /See:/ 'newCreateCacheCluster' smart constructor.
data CreateCacheCluster = CreateCacheCluster'
  { -- | Specifies whether the nodes in this Memcached cluster are created in a
    -- single Availability Zone or created across multiple Availability Zones
    -- in the cluster\'s region.
    --
    -- This parameter is only supported for Memcached clusters.
    --
    -- If the @AZMode@ and @PreferredAvailabilityZones@ are not specified,
    -- ElastiCache assumes @single-az@ mode.
    CreateCacheCluster -> Maybe AZMode
aZMode :: Prelude.Maybe AZMode,
    -- | __Reserved parameter.__ The password used to access a password protected
    -- server.
    --
    -- 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.
    CreateCacheCluster -> Maybe Text
authToken :: Prelude.Maybe Prelude.Text,
    -- | If you are running Redis engine version 6.0 or later, set this
    -- parameter to yes if you want to opt-in to the next auto minor version
    -- upgrade campaign. This parameter is disabled for previous versions.
    CreateCacheCluster -> Maybe Bool
autoMinorVersionUpgrade :: Prelude.Maybe Prelude.Bool,
    -- | The compute and memory capacity of the nodes in the node group (shard).
    --
    -- The following node types are supported by ElastiCache. Generally
    -- speaking, the current generation types provide more memory and
    -- computational power at lower cost when compared to their equivalent
    -- previous generation counterparts.
    --
    -- -   General purpose:
    --
    --     -   Current generation:
    --
    --         __M6g node types__ (available only for Redis engine version
    --         5.0.6 onward and for Memcached engine version 1.5.16 onward):
    --         @cache.m6g.large@, @cache.m6g.xlarge@, @cache.m6g.2xlarge@,
    --         @cache.m6g.4xlarge@, @cache.m6g.8xlarge@, @cache.m6g.12xlarge@,
    --         @cache.m6g.16xlarge@
    --
    --         For region availability, see
    --         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
    --
    --         __M5 node types:__ @cache.m5.large@, @cache.m5.xlarge@,
    --         @cache.m5.2xlarge@, @cache.m5.4xlarge@, @cache.m5.12xlarge@,
    --         @cache.m5.24xlarge@
    --
    --         __M4 node types:__ @cache.m4.large@, @cache.m4.xlarge@,
    --         @cache.m4.2xlarge@, @cache.m4.4xlarge@, @cache.m4.10xlarge@
    --
    --         __T4g node types__ (available only for Redis engine version
    --         5.0.6 onward and Memcached engine version 1.5.16 onward):
    --         @cache.t4g.micro@, @cache.t4g.small@, @cache.t4g.medium@
    --
    --         __T3 node types:__ @cache.t3.micro@, @cache.t3.small@,
    --         @cache.t3.medium@
    --
    --         __T2 node types:__ @cache.t2.micro@, @cache.t2.small@,
    --         @cache.t2.medium@
    --
    --     -   Previous generation: (not recommended. Existing clusters are
    --         still supported but creation of new clusters is not supported
    --         for these types.)
    --
    --         __T1 node types:__ @cache.t1.micro@
    --
    --         __M1 node types:__ @cache.m1.small@, @cache.m1.medium@,
    --         @cache.m1.large@, @cache.m1.xlarge@
    --
    --         __M3 node types:__ @cache.m3.medium@, @cache.m3.large@,
    --         @cache.m3.xlarge@, @cache.m3.2xlarge@
    --
    -- -   Compute optimized:
    --
    --     -   Previous generation: (not recommended. Existing clusters are
    --         still supported but creation of new clusters is not supported
    --         for these types.)
    --
    --         __C1 node types:__ @cache.c1.xlarge@
    --
    -- -   Memory optimized:
    --
    --     -   Current generation:
    --
    --         __R6g node types__ (available only for Redis engine version
    --         5.0.6 onward and for Memcached engine version 1.5.16 onward).
    --
    --         @cache.r6g.large@, @cache.r6g.xlarge@, @cache.r6g.2xlarge@,
    --         @cache.r6g.4xlarge@, @cache.r6g.8xlarge@, @cache.r6g.12xlarge@,
    --         @cache.r6g.16xlarge@
    --
    --         For region availability, see
    --         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
    --
    --         __R5 node types:__ @cache.r5.large@, @cache.r5.xlarge@,
    --         @cache.r5.2xlarge@, @cache.r5.4xlarge@, @cache.r5.12xlarge@,
    --         @cache.r5.24xlarge@
    --
    --         __R4 node types:__ @cache.r4.large@, @cache.r4.xlarge@,
    --         @cache.r4.2xlarge@, @cache.r4.4xlarge@, @cache.r4.8xlarge@,
    --         @cache.r4.16xlarge@
    --
    --     -   Previous generation: (not recommended. Existing clusters are
    --         still supported but creation of new clusters is not supported
    --         for these types.)
    --
    --         __M2 node types:__ @cache.m2.xlarge@, @cache.m2.2xlarge@,
    --         @cache.m2.4xlarge@
    --
    --         __R3 node types:__ @cache.r3.large@, @cache.r3.xlarge@,
    --         @cache.r3.2xlarge@, @cache.r3.4xlarge@, @cache.r3.8xlarge@
    --
    -- __Additional node type info__
    --
    -- -   All current generation instance types are created in Amazon VPC by
    --     default.
    --
    -- -   Redis append-only files (AOF) are not supported for T1 or T2
    --     instances.
    --
    -- -   Redis Multi-AZ with automatic failover is not supported on T1
    --     instances.
    --
    -- -   Redis configuration variables @appendonly@ and @appendfsync@ are not
    --     supported on Redis version 2.8.22 and later.
    CreateCacheCluster -> Maybe Text
cacheNodeType :: Prelude.Maybe Prelude.Text,
    -- | The name of the parameter group to associate with this cluster. If this
    -- argument is omitted, the default parameter group for the specified
    -- engine is used. You cannot use any parameter group which has
    -- @cluster-enabled=\'yes\'@ when creating a cluster.
    CreateCacheCluster -> Maybe Text
cacheParameterGroupName :: Prelude.Maybe Prelude.Text,
    -- | A list of security group names to associate with this cluster.
    --
    -- Use this parameter only when you are creating a cluster outside of an
    -- Amazon Virtual Private Cloud (Amazon VPC).
    CreateCacheCluster -> Maybe [Text]
cacheSecurityGroupNames :: Prelude.Maybe [Prelude.Text],
    -- | The name of the subnet group to be used for the cluster.
    --
    -- Use this parameter only when you are creating a cluster in an Amazon
    -- Virtual Private Cloud (Amazon VPC).
    --
    -- 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>.
    CreateCacheCluster -> Maybe Text
cacheSubnetGroupName :: Prelude.Maybe Prelude.Text,
    -- | The name of the cache engine to be used for this cluster.
    --
    -- Valid values for this parameter are: @memcached@ | @redis@
    CreateCacheCluster -> Maybe Text
engine :: Prelude.Maybe Prelude.Text,
    -- | The version number of the cache engine to be used for this cluster. 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>),
    -- 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.
    CreateCacheCluster -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
    -- | The network type you choose when modifying a cluster, either @ipv4@ |
    -- @ipv6@. IPv6 is supported for workloads using Redis engine version 6.2
    -- onward or Memcached engine version 1.6.6 on all instances built on the
    -- <https://aws.amazon.com/ec2/nitro/ Nitro system>.
    CreateCacheCluster -> Maybe IpDiscovery
ipDiscovery :: Prelude.Maybe IpDiscovery,
    -- | Specifies the destination, format and type of the logs.
    CreateCacheCluster -> Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations :: Prelude.Maybe [LogDeliveryConfigurationRequest],
    -- | Must be either @ipv4@ | @ipv6@ | @dual_stack@. IPv6 is supported for
    -- workloads using Redis engine version 6.2 onward or Memcached engine
    -- version 1.6.6 on all instances built on the
    -- <https://aws.amazon.com/ec2/nitro/ Nitro system>.
    CreateCacheCluster -> Maybe NetworkType
networkType :: Prelude.Maybe NetworkType,
    -- | 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.
    CreateCacheCluster -> Maybe Text
notificationTopicArn :: Prelude.Maybe Prelude.Text,
    -- | The initial number of cache nodes that the cluster has.
    --
    -- For clusters running Redis, this value must be 1. For clusters running
    -- Memcached, this value must be between 1 and 40.
    --
    -- If you need more than 40 nodes for your Memcached cluster, please fill
    -- out the ElastiCache Limit Increase Request form at
    -- <http://aws.amazon.com/contact-us/elasticache-node-limit-request/>.
    CreateCacheCluster -> Maybe Int
numCacheNodes :: Prelude.Maybe Prelude.Int,
    -- | Specifies whether the nodes in the cluster are created in a single
    -- outpost or across multiple outposts.
    CreateCacheCluster -> Maybe OutpostMode
outpostMode :: Prelude.Maybe OutpostMode,
    -- | The port number on which each of the cache nodes accepts connections.
    CreateCacheCluster -> Maybe Int
port :: Prelude.Maybe Prelude.Int,
    -- | The EC2 Availability Zone in which the cluster is created.
    --
    -- All nodes belonging to this cluster are placed in the preferred
    -- Availability Zone. If you want to create your nodes across multiple
    -- Availability Zones, use @PreferredAvailabilityZones@.
    --
    -- Default: System chosen Availability Zone.
    CreateCacheCluster -> Maybe Text
preferredAvailabilityZone :: Prelude.Maybe Prelude.Text,
    -- | A list of the Availability Zones in which cache nodes are created. The
    -- order of the zones in the list is not important.
    --
    -- This option is only supported on Memcached.
    --
    -- If you are creating your cluster in an Amazon VPC (recommended) you can
    -- only locate nodes in Availability Zones that are associated with the
    -- subnets in the selected subnet group.
    --
    -- The number of Availability Zones listed must equal the value of
    -- @NumCacheNodes@.
    --
    -- If you want all the nodes in the same Availability Zone, use
    -- @PreferredAvailabilityZone@ instead, or repeat the Availability Zone
    -- multiple times in the list.
    --
    -- Default: System chosen Availability Zones.
    CreateCacheCluster -> Maybe [Text]
preferredAvailabilityZones :: 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.
    CreateCacheCluster -> Maybe Text
preferredMaintenanceWindow :: Prelude.Maybe Prelude.Text,
    -- | The outpost ARN in which the cache cluster is created.
    CreateCacheCluster -> Maybe Text
preferredOutpostArn :: Prelude.Maybe Prelude.Text,
    -- | The outpost ARNs in which the cache cluster is created.
    CreateCacheCluster -> Maybe [Text]
preferredOutpostArns :: Prelude.Maybe [Prelude.Text],
    -- | The ID of the replication group to which this cluster should belong. If
    -- this parameter is specified, the cluster is added to the specified
    -- replication group as a read replica; otherwise, the cluster is a
    -- standalone primary that is not part of any replication group.
    --
    -- If the specified replication group is Multi-AZ enabled and the
    -- Availability Zone is not specified, the cluster is created in
    -- Availability Zones that provide the best spread of read replicas across
    -- Availability Zones.
    --
    -- This parameter is only valid if the @Engine@ parameter is @redis@.
    CreateCacheCluster -> Maybe Text
replicationGroupId :: Prelude.Maybe Prelude.Text,
    -- | One or more VPC security groups associated with the cluster.
    --
    -- Use this parameter only when you are creating a cluster in an Amazon
    -- Virtual Private Cloud (Amazon VPC).
    CreateCacheCluster -> Maybe [Text]
securityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | A single-element string list containing an Amazon Resource Name (ARN)
    -- that uniquely identifies a Redis RDB snapshot file stored in Amazon S3.
    -- The snapshot file is used to populate the node group (shard). The Amazon
    -- S3 object name in the ARN cannot contain any commas.
    --
    -- This parameter is only valid if the @Engine@ parameter is @redis@.
    --
    -- Example of an Amazon S3 ARN: @arn:aws:s3:::my_bucket\/snapshot1.rdb@
    CreateCacheCluster -> Maybe [Text]
snapshotArns :: Prelude.Maybe [Prelude.Text],
    -- | The name of a Redis snapshot from which to restore data into the new
    -- node group (shard). The snapshot status changes to @restoring@ while the
    -- new node group (shard) is being created.
    --
    -- This parameter is only valid if the @Engine@ parameter is @redis@.
    CreateCacheCluster -> Maybe Text
snapshotName :: Prelude.Maybe Prelude.Text,
    -- | The number of days for which ElastiCache retains automatic snapshots
    -- before deleting them. For example, if you set @SnapshotRetentionLimit@
    -- to 5, a snapshot taken today is retained for 5 days before being
    -- deleted.
    --
    -- This parameter is only valid if the @Engine@ parameter is @redis@.
    --
    -- Default: 0 (i.e., automatic backups are disabled for this cache
    -- cluster).
    CreateCacheCluster -> Maybe Int
snapshotRetentionLimit :: Prelude.Maybe Prelude.Int,
    -- | The daily time range (in UTC) during which ElastiCache begins taking a
    -- daily snapshot of your node group (shard).
    --
    -- Example: @05:00-09:00@
    --
    -- If you do not specify this parameter, ElastiCache automatically chooses
    -- an appropriate time range.
    --
    -- This parameter is only valid if the @Engine@ parameter is @redis@.
    CreateCacheCluster -> Maybe Text
snapshotWindow :: Prelude.Maybe Prelude.Text,
    -- | A list of tags to be added to this resource.
    CreateCacheCluster -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | A flag that enables in-transit encryption when set to true.
    --
    -- Only available when creating a cache cluster in an Amazon VPC using
    -- Memcached version 1.6.12 or later.
    CreateCacheCluster -> Maybe Bool
transitEncryptionEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The node group (shard) identifier. This parameter is stored as a
    -- lowercase string.
    --
    -- __Constraints:__
    --
    -- -   A name must contain from 1 to 50 alphanumeric characters or hyphens.
    --
    -- -   The first character must be a letter.
    --
    -- -   A name cannot end with a hyphen or contain two consecutive hyphens.
    CreateCacheCluster -> Text
cacheClusterId :: Prelude.Text
  }
  deriving (CreateCacheCluster -> CreateCacheCluster -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateCacheCluster -> CreateCacheCluster -> Bool
$c/= :: CreateCacheCluster -> CreateCacheCluster -> Bool
== :: CreateCacheCluster -> CreateCacheCluster -> Bool
$c== :: CreateCacheCluster -> CreateCacheCluster -> Bool
Prelude.Eq, ReadPrec [CreateCacheCluster]
ReadPrec CreateCacheCluster
Int -> ReadS CreateCacheCluster
ReadS [CreateCacheCluster]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateCacheCluster]
$creadListPrec :: ReadPrec [CreateCacheCluster]
readPrec :: ReadPrec CreateCacheCluster
$creadPrec :: ReadPrec CreateCacheCluster
readList :: ReadS [CreateCacheCluster]
$creadList :: ReadS [CreateCacheCluster]
readsPrec :: Int -> ReadS CreateCacheCluster
$creadsPrec :: Int -> ReadS CreateCacheCluster
Prelude.Read, Int -> CreateCacheCluster -> ShowS
[CreateCacheCluster] -> ShowS
CreateCacheCluster -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateCacheCluster] -> ShowS
$cshowList :: [CreateCacheCluster] -> ShowS
show :: CreateCacheCluster -> String
$cshow :: CreateCacheCluster -> String
showsPrec :: Int -> CreateCacheCluster -> ShowS
$cshowsPrec :: Int -> CreateCacheCluster -> ShowS
Prelude.Show, forall x. Rep CreateCacheCluster x -> CreateCacheCluster
forall x. CreateCacheCluster -> Rep CreateCacheCluster x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateCacheCluster x -> CreateCacheCluster
$cfrom :: forall x. CreateCacheCluster -> Rep CreateCacheCluster x
Prelude.Generic)

-- |
-- Create a value of 'CreateCacheCluster' 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:
--
-- 'aZMode', 'createCacheCluster_aZMode' - Specifies whether the nodes in this Memcached cluster are created in a
-- single Availability Zone or created across multiple Availability Zones
-- in the cluster\'s region.
--
-- This parameter is only supported for Memcached clusters.
--
-- If the @AZMode@ and @PreferredAvailabilityZones@ are not specified,
-- ElastiCache assumes @single-az@ mode.
--
-- 'authToken', 'createCacheCluster_authToken' - __Reserved parameter.__ The password used to access a password protected
-- server.
--
-- Password constraints:
--
-- -   Must be only printable ASCII characters.
--
-- -   Must be at least 16 characters and no more than 128 characters in
--     length.
--
-- -   The only permitted printable special characters are !, &, #, $, ^,
--     \<, >, and -. Other printable special characters cannot be used in
--     the AUTH token.
--
-- For more information, see <http://redis.io/commands/AUTH AUTH password>
-- at http:\/\/redis.io\/commands\/AUTH.
--
-- 'autoMinorVersionUpgrade', 'createCacheCluster_autoMinorVersionUpgrade' - If you are running Redis engine version 6.0 or later, set this
-- parameter to yes if you want to opt-in to the next auto minor version
-- upgrade campaign. This parameter is disabled for previous versions.
--
-- 'cacheNodeType', 'createCacheCluster_cacheNodeType' - The compute and memory capacity of the nodes in the node group (shard).
--
-- The following node types are supported by ElastiCache. Generally
-- speaking, the current generation types provide more memory and
-- computational power at lower cost when compared to their equivalent
-- previous generation counterparts.
--
-- -   General purpose:
--
--     -   Current generation:
--
--         __M6g node types__ (available only for Redis engine version
--         5.0.6 onward and for Memcached engine version 1.5.16 onward):
--         @cache.m6g.large@, @cache.m6g.xlarge@, @cache.m6g.2xlarge@,
--         @cache.m6g.4xlarge@, @cache.m6g.8xlarge@, @cache.m6g.12xlarge@,
--         @cache.m6g.16xlarge@
--
--         For region availability, see
--         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
--
--         __M5 node types:__ @cache.m5.large@, @cache.m5.xlarge@,
--         @cache.m5.2xlarge@, @cache.m5.4xlarge@, @cache.m5.12xlarge@,
--         @cache.m5.24xlarge@
--
--         __M4 node types:__ @cache.m4.large@, @cache.m4.xlarge@,
--         @cache.m4.2xlarge@, @cache.m4.4xlarge@, @cache.m4.10xlarge@
--
--         __T4g node types__ (available only for Redis engine version
--         5.0.6 onward and Memcached engine version 1.5.16 onward):
--         @cache.t4g.micro@, @cache.t4g.small@, @cache.t4g.medium@
--
--         __T3 node types:__ @cache.t3.micro@, @cache.t3.small@,
--         @cache.t3.medium@
--
--         __T2 node types:__ @cache.t2.micro@, @cache.t2.small@,
--         @cache.t2.medium@
--
--     -   Previous generation: (not recommended. Existing clusters are
--         still supported but creation of new clusters is not supported
--         for these types.)
--
--         __T1 node types:__ @cache.t1.micro@
--
--         __M1 node types:__ @cache.m1.small@, @cache.m1.medium@,
--         @cache.m1.large@, @cache.m1.xlarge@
--
--         __M3 node types:__ @cache.m3.medium@, @cache.m3.large@,
--         @cache.m3.xlarge@, @cache.m3.2xlarge@
--
-- -   Compute optimized:
--
--     -   Previous generation: (not recommended. Existing clusters are
--         still supported but creation of new clusters is not supported
--         for these types.)
--
--         __C1 node types:__ @cache.c1.xlarge@
--
-- -   Memory optimized:
--
--     -   Current generation:
--
--         __R6g node types__ (available only for Redis engine version
--         5.0.6 onward and for Memcached engine version 1.5.16 onward).
--
--         @cache.r6g.large@, @cache.r6g.xlarge@, @cache.r6g.2xlarge@,
--         @cache.r6g.4xlarge@, @cache.r6g.8xlarge@, @cache.r6g.12xlarge@,
--         @cache.r6g.16xlarge@
--
--         For region availability, see
--         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
--
--         __R5 node types:__ @cache.r5.large@, @cache.r5.xlarge@,
--         @cache.r5.2xlarge@, @cache.r5.4xlarge@, @cache.r5.12xlarge@,
--         @cache.r5.24xlarge@
--
--         __R4 node types:__ @cache.r4.large@, @cache.r4.xlarge@,
--         @cache.r4.2xlarge@, @cache.r4.4xlarge@, @cache.r4.8xlarge@,
--         @cache.r4.16xlarge@
--
--     -   Previous generation: (not recommended. Existing clusters are
--         still supported but creation of new clusters is not supported
--         for these types.)
--
--         __M2 node types:__ @cache.m2.xlarge@, @cache.m2.2xlarge@,
--         @cache.m2.4xlarge@
--
--         __R3 node types:__ @cache.r3.large@, @cache.r3.xlarge@,
--         @cache.r3.2xlarge@, @cache.r3.4xlarge@, @cache.r3.8xlarge@
--
-- __Additional node type info__
--
-- -   All current generation instance types are created in Amazon VPC by
--     default.
--
-- -   Redis append-only files (AOF) are not supported for T1 or T2
--     instances.
--
-- -   Redis Multi-AZ with automatic failover is not supported on T1
--     instances.
--
-- -   Redis configuration variables @appendonly@ and @appendfsync@ are not
--     supported on Redis version 2.8.22 and later.
--
-- 'cacheParameterGroupName', 'createCacheCluster_cacheParameterGroupName' - The name of the parameter group to associate with this cluster. If this
-- argument is omitted, the default parameter group for the specified
-- engine is used. You cannot use any parameter group which has
-- @cluster-enabled=\'yes\'@ when creating a cluster.
--
-- 'cacheSecurityGroupNames', 'createCacheCluster_cacheSecurityGroupNames' - A list of security group names to associate with this cluster.
--
-- Use this parameter only when you are creating a cluster outside of an
-- Amazon Virtual Private Cloud (Amazon VPC).
--
-- 'cacheSubnetGroupName', 'createCacheCluster_cacheSubnetGroupName' - The name of the subnet group to be used for the cluster.
--
-- Use this parameter only when you are creating a cluster in an Amazon
-- Virtual Private Cloud (Amazon VPC).
--
-- 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>.
--
-- 'engine', 'createCacheCluster_engine' - The name of the cache engine to be used for this cluster.
--
-- Valid values for this parameter are: @memcached@ | @redis@
--
-- 'engineVersion', 'createCacheCluster_engineVersion' - The version number of the cache engine to be used for this cluster. 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>),
-- 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.
--
-- 'ipDiscovery', 'createCacheCluster_ipDiscovery' - The network type you choose when modifying a cluster, either @ipv4@ |
-- @ipv6@. IPv6 is supported for workloads using Redis engine version 6.2
-- onward or Memcached engine version 1.6.6 on all instances built on the
-- <https://aws.amazon.com/ec2/nitro/ Nitro system>.
--
-- 'logDeliveryConfigurations', 'createCacheCluster_logDeliveryConfigurations' - Specifies the destination, format and type of the logs.
--
-- 'networkType', 'createCacheCluster_networkType' - Must be either @ipv4@ | @ipv6@ | @dual_stack@. IPv6 is supported for
-- workloads using Redis engine version 6.2 onward or Memcached engine
-- version 1.6.6 on all instances built on the
-- <https://aws.amazon.com/ec2/nitro/ Nitro system>.
--
-- 'notificationTopicArn', 'createCacheCluster_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.
--
-- 'numCacheNodes', 'createCacheCluster_numCacheNodes' - The initial number of cache nodes that the cluster has.
--
-- For clusters running Redis, this value must be 1. For clusters running
-- Memcached, this value must be between 1 and 40.
--
-- If you need more than 40 nodes for your Memcached cluster, please fill
-- out the ElastiCache Limit Increase Request form at
-- <http://aws.amazon.com/contact-us/elasticache-node-limit-request/>.
--
-- 'outpostMode', 'createCacheCluster_outpostMode' - Specifies whether the nodes in the cluster are created in a single
-- outpost or across multiple outposts.
--
-- 'port', 'createCacheCluster_port' - The port number on which each of the cache nodes accepts connections.
--
-- 'preferredAvailabilityZone', 'createCacheCluster_preferredAvailabilityZone' - The EC2 Availability Zone in which the cluster is created.
--
-- All nodes belonging to this cluster are placed in the preferred
-- Availability Zone. If you want to create your nodes across multiple
-- Availability Zones, use @PreferredAvailabilityZones@.
--
-- Default: System chosen Availability Zone.
--
-- 'preferredAvailabilityZones', 'createCacheCluster_preferredAvailabilityZones' - A list of the Availability Zones in which cache nodes are created. The
-- order of the zones in the list is not important.
--
-- This option is only supported on Memcached.
--
-- If you are creating your cluster in an Amazon VPC (recommended) you can
-- only locate nodes in Availability Zones that are associated with the
-- subnets in the selected subnet group.
--
-- The number of Availability Zones listed must equal the value of
-- @NumCacheNodes@.
--
-- If you want all the nodes in the same Availability Zone, use
-- @PreferredAvailabilityZone@ instead, or repeat the Availability Zone
-- multiple times in the list.
--
-- Default: System chosen Availability Zones.
--
-- 'preferredMaintenanceWindow', 'createCacheCluster_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.
--
-- 'preferredOutpostArn', 'createCacheCluster_preferredOutpostArn' - The outpost ARN in which the cache cluster is created.
--
-- 'preferredOutpostArns', 'createCacheCluster_preferredOutpostArns' - The outpost ARNs in which the cache cluster is created.
--
-- 'replicationGroupId', 'createCacheCluster_replicationGroupId' - The ID of the replication group to which this cluster should belong. If
-- this parameter is specified, the cluster is added to the specified
-- replication group as a read replica; otherwise, the cluster is a
-- standalone primary that is not part of any replication group.
--
-- If the specified replication group is Multi-AZ enabled and the
-- Availability Zone is not specified, the cluster is created in
-- Availability Zones that provide the best spread of read replicas across
-- Availability Zones.
--
-- This parameter is only valid if the @Engine@ parameter is @redis@.
--
-- 'securityGroupIds', 'createCacheCluster_securityGroupIds' - One or more VPC security groups associated with the cluster.
--
-- Use this parameter only when you are creating a cluster in an Amazon
-- Virtual Private Cloud (Amazon VPC).
--
-- 'snapshotArns', 'createCacheCluster_snapshotArns' - A single-element string list containing an Amazon Resource Name (ARN)
-- that uniquely identifies a Redis RDB snapshot file stored in Amazon S3.
-- The snapshot file is used to populate the node group (shard). The Amazon
-- S3 object name in the ARN cannot contain any commas.
--
-- This parameter is only valid if the @Engine@ parameter is @redis@.
--
-- Example of an Amazon S3 ARN: @arn:aws:s3:::my_bucket\/snapshot1.rdb@
--
-- 'snapshotName', 'createCacheCluster_snapshotName' - The name of a Redis snapshot from which to restore data into the new
-- node group (shard). The snapshot status changes to @restoring@ while the
-- new node group (shard) is being created.
--
-- This parameter is only valid if the @Engine@ parameter is @redis@.
--
-- 'snapshotRetentionLimit', 'createCacheCluster_snapshotRetentionLimit' - The number of days for which ElastiCache retains automatic snapshots
-- before deleting them. For example, if you set @SnapshotRetentionLimit@
-- to 5, a snapshot taken today is retained for 5 days before being
-- deleted.
--
-- This parameter is only valid if the @Engine@ parameter is @redis@.
--
-- Default: 0 (i.e., automatic backups are disabled for this cache
-- cluster).
--
-- 'snapshotWindow', 'createCacheCluster_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.
--
-- This parameter is only valid if the @Engine@ parameter is @redis@.
--
-- 'tags', 'createCacheCluster_tags' - A list of tags to be added to this resource.
--
-- 'transitEncryptionEnabled', 'createCacheCluster_transitEncryptionEnabled' - A flag that enables in-transit encryption when set to true.
--
-- Only available when creating a cache cluster in an Amazon VPC using
-- Memcached version 1.6.12 or later.
--
-- 'cacheClusterId', 'createCacheCluster_cacheClusterId' - The node group (shard) identifier. This parameter is stored as a
-- lowercase string.
--
-- __Constraints:__
--
-- -   A name must contain from 1 to 50 alphanumeric characters or hyphens.
--
-- -   The first character must be a letter.
--
-- -   A name cannot end with a hyphen or contain two consecutive hyphens.
newCreateCacheCluster ::
  -- | 'cacheClusterId'
  Prelude.Text ->
  CreateCacheCluster
newCreateCacheCluster :: Text -> CreateCacheCluster
newCreateCacheCluster Text
pCacheClusterId_ =
  CreateCacheCluster'
    { $sel:aZMode:CreateCacheCluster' :: Maybe AZMode
aZMode = forall a. Maybe a
Prelude.Nothing,
      $sel:authToken:CreateCacheCluster' :: Maybe Text
authToken = forall a. Maybe a
Prelude.Nothing,
      $sel:autoMinorVersionUpgrade:CreateCacheCluster' :: Maybe Bool
autoMinorVersionUpgrade = forall a. Maybe a
Prelude.Nothing,
      $sel:cacheNodeType:CreateCacheCluster' :: Maybe Text
cacheNodeType = forall a. Maybe a
Prelude.Nothing,
      $sel:cacheParameterGroupName:CreateCacheCluster' :: Maybe Text
cacheParameterGroupName = forall a. Maybe a
Prelude.Nothing,
      $sel:cacheSecurityGroupNames:CreateCacheCluster' :: Maybe [Text]
cacheSecurityGroupNames = forall a. Maybe a
Prelude.Nothing,
      $sel:cacheSubnetGroupName:CreateCacheCluster' :: Maybe Text
cacheSubnetGroupName = forall a. Maybe a
Prelude.Nothing,
      $sel:engine:CreateCacheCluster' :: Maybe Text
engine = forall a. Maybe a
Prelude.Nothing,
      $sel:engineVersion:CreateCacheCluster' :: Maybe Text
engineVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:ipDiscovery:CreateCacheCluster' :: Maybe IpDiscovery
ipDiscovery = forall a. Maybe a
Prelude.Nothing,
      $sel:logDeliveryConfigurations:CreateCacheCluster' :: Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations = forall a. Maybe a
Prelude.Nothing,
      $sel:networkType:CreateCacheCluster' :: Maybe NetworkType
networkType = forall a. Maybe a
Prelude.Nothing,
      $sel:notificationTopicArn:CreateCacheCluster' :: Maybe Text
notificationTopicArn = forall a. Maybe a
Prelude.Nothing,
      $sel:numCacheNodes:CreateCacheCluster' :: Maybe Int
numCacheNodes = forall a. Maybe a
Prelude.Nothing,
      $sel:outpostMode:CreateCacheCluster' :: Maybe OutpostMode
outpostMode = forall a. Maybe a
Prelude.Nothing,
      $sel:port:CreateCacheCluster' :: Maybe Int
port = forall a. Maybe a
Prelude.Nothing,
      $sel:preferredAvailabilityZone:CreateCacheCluster' :: Maybe Text
preferredAvailabilityZone = forall a. Maybe a
Prelude.Nothing,
      $sel:preferredAvailabilityZones:CreateCacheCluster' :: Maybe [Text]
preferredAvailabilityZones = forall a. Maybe a
Prelude.Nothing,
      $sel:preferredMaintenanceWindow:CreateCacheCluster' :: Maybe Text
preferredMaintenanceWindow = forall a. Maybe a
Prelude.Nothing,
      $sel:preferredOutpostArn:CreateCacheCluster' :: Maybe Text
preferredOutpostArn = forall a. Maybe a
Prelude.Nothing,
      $sel:preferredOutpostArns:CreateCacheCluster' :: Maybe [Text]
preferredOutpostArns = forall a. Maybe a
Prelude.Nothing,
      $sel:replicationGroupId:CreateCacheCluster' :: Maybe Text
replicationGroupId = forall a. Maybe a
Prelude.Nothing,
      $sel:securityGroupIds:CreateCacheCluster' :: Maybe [Text]
securityGroupIds = forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotArns:CreateCacheCluster' :: Maybe [Text]
snapshotArns = forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotName:CreateCacheCluster' :: Maybe Text
snapshotName = forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotRetentionLimit:CreateCacheCluster' :: Maybe Int
snapshotRetentionLimit = forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotWindow:CreateCacheCluster' :: Maybe Text
snapshotWindow = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateCacheCluster' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:transitEncryptionEnabled:CreateCacheCluster' :: Maybe Bool
transitEncryptionEnabled = forall a. Maybe a
Prelude.Nothing,
      $sel:cacheClusterId:CreateCacheCluster' :: Text
cacheClusterId = Text
pCacheClusterId_
    }

-- | Specifies whether the nodes in this Memcached cluster are created in a
-- single Availability Zone or created across multiple Availability Zones
-- in the cluster\'s region.
--
-- This parameter is only supported for Memcached clusters.
--
-- If the @AZMode@ and @PreferredAvailabilityZones@ are not specified,
-- ElastiCache assumes @single-az@ mode.
createCacheCluster_aZMode :: Lens.Lens' CreateCacheCluster (Prelude.Maybe AZMode)
createCacheCluster_aZMode :: Lens' CreateCacheCluster (Maybe AZMode)
createCacheCluster_aZMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheCluster' {Maybe AZMode
aZMode :: Maybe AZMode
$sel:aZMode:CreateCacheCluster' :: CreateCacheCluster -> Maybe AZMode
aZMode} -> Maybe AZMode
aZMode) (\s :: CreateCacheCluster
s@CreateCacheCluster' {} Maybe AZMode
a -> CreateCacheCluster
s {$sel:aZMode:CreateCacheCluster' :: Maybe AZMode
aZMode = Maybe AZMode
a} :: CreateCacheCluster)

-- | __Reserved parameter.__ The password used to access a password protected
-- server.
--
-- 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.
createCacheCluster_authToken :: Lens.Lens' CreateCacheCluster (Prelude.Maybe Prelude.Text)
createCacheCluster_authToken :: Lens' CreateCacheCluster (Maybe Text)
createCacheCluster_authToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheCluster' {Maybe Text
authToken :: Maybe Text
$sel:authToken:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
authToken} -> Maybe Text
authToken) (\s :: CreateCacheCluster
s@CreateCacheCluster' {} Maybe Text
a -> CreateCacheCluster
s {$sel:authToken:CreateCacheCluster' :: Maybe Text
authToken = Maybe Text
a} :: CreateCacheCluster)

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

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

-- | The name of the parameter group to associate with this cluster. If this
-- argument is omitted, the default parameter group for the specified
-- engine is used. You cannot use any parameter group which has
-- @cluster-enabled=\'yes\'@ when creating a cluster.
createCacheCluster_cacheParameterGroupName :: Lens.Lens' CreateCacheCluster (Prelude.Maybe Prelude.Text)
createCacheCluster_cacheParameterGroupName :: Lens' CreateCacheCluster (Maybe Text)
createCacheCluster_cacheParameterGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheCluster' {Maybe Text
cacheParameterGroupName :: Maybe Text
$sel:cacheParameterGroupName:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
cacheParameterGroupName} -> Maybe Text
cacheParameterGroupName) (\s :: CreateCacheCluster
s@CreateCacheCluster' {} Maybe Text
a -> CreateCacheCluster
s {$sel:cacheParameterGroupName:CreateCacheCluster' :: Maybe Text
cacheParameterGroupName = Maybe Text
a} :: CreateCacheCluster)

-- | A list of security group names to associate with this cluster.
--
-- Use this parameter only when you are creating a cluster outside of an
-- Amazon Virtual Private Cloud (Amazon VPC).
createCacheCluster_cacheSecurityGroupNames :: Lens.Lens' CreateCacheCluster (Prelude.Maybe [Prelude.Text])
createCacheCluster_cacheSecurityGroupNames :: Lens' CreateCacheCluster (Maybe [Text])
createCacheCluster_cacheSecurityGroupNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheCluster' {Maybe [Text]
cacheSecurityGroupNames :: Maybe [Text]
$sel:cacheSecurityGroupNames:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Text]
cacheSecurityGroupNames} -> Maybe [Text]
cacheSecurityGroupNames) (\s :: CreateCacheCluster
s@CreateCacheCluster' {} Maybe [Text]
a -> CreateCacheCluster
s {$sel:cacheSecurityGroupNames:CreateCacheCluster' :: Maybe [Text]
cacheSecurityGroupNames = Maybe [Text]
a} :: CreateCacheCluster) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the subnet group to be used for the cluster.
--
-- Use this parameter only when you are creating a cluster in an Amazon
-- Virtual Private Cloud (Amazon VPC).
--
-- 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>.
createCacheCluster_cacheSubnetGroupName :: Lens.Lens' CreateCacheCluster (Prelude.Maybe Prelude.Text)
createCacheCluster_cacheSubnetGroupName :: Lens' CreateCacheCluster (Maybe Text)
createCacheCluster_cacheSubnetGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheCluster' {Maybe Text
cacheSubnetGroupName :: Maybe Text
$sel:cacheSubnetGroupName:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
cacheSubnetGroupName} -> Maybe Text
cacheSubnetGroupName) (\s :: CreateCacheCluster
s@CreateCacheCluster' {} Maybe Text
a -> CreateCacheCluster
s {$sel:cacheSubnetGroupName:CreateCacheCluster' :: Maybe Text
cacheSubnetGroupName = Maybe Text
a} :: CreateCacheCluster)

-- | The name of the cache engine to be used for this cluster.
--
-- Valid values for this parameter are: @memcached@ | @redis@
createCacheCluster_engine :: Lens.Lens' CreateCacheCluster (Prelude.Maybe Prelude.Text)
createCacheCluster_engine :: Lens' CreateCacheCluster (Maybe Text)
createCacheCluster_engine = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheCluster' {Maybe Text
engine :: Maybe Text
$sel:engine:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
engine} -> Maybe Text
engine) (\s :: CreateCacheCluster
s@CreateCacheCluster' {} Maybe Text
a -> CreateCacheCluster
s {$sel:engine:CreateCacheCluster' :: Maybe Text
engine = Maybe Text
a} :: CreateCacheCluster)

-- | The version number of the cache engine to be used for this cluster. 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>),
-- 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.
createCacheCluster_engineVersion :: Lens.Lens' CreateCacheCluster (Prelude.Maybe Prelude.Text)
createCacheCluster_engineVersion :: Lens' CreateCacheCluster (Maybe Text)
createCacheCluster_engineVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheCluster' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: CreateCacheCluster
s@CreateCacheCluster' {} Maybe Text
a -> CreateCacheCluster
s {$sel:engineVersion:CreateCacheCluster' :: Maybe Text
engineVersion = Maybe Text
a} :: CreateCacheCluster)

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

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

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

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

-- | The initial number of cache nodes that the cluster has.
--
-- For clusters running Redis, this value must be 1. For clusters running
-- Memcached, this value must be between 1 and 40.
--
-- If you need more than 40 nodes for your Memcached cluster, please fill
-- out the ElastiCache Limit Increase Request form at
-- <http://aws.amazon.com/contact-us/elasticache-node-limit-request/>.
createCacheCluster_numCacheNodes :: Lens.Lens' CreateCacheCluster (Prelude.Maybe Prelude.Int)
createCacheCluster_numCacheNodes :: Lens' CreateCacheCluster (Maybe Int)
createCacheCluster_numCacheNodes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheCluster' {Maybe Int
numCacheNodes :: Maybe Int
$sel:numCacheNodes:CreateCacheCluster' :: CreateCacheCluster -> Maybe Int
numCacheNodes} -> Maybe Int
numCacheNodes) (\s :: CreateCacheCluster
s@CreateCacheCluster' {} Maybe Int
a -> CreateCacheCluster
s {$sel:numCacheNodes:CreateCacheCluster' :: Maybe Int
numCacheNodes = Maybe Int
a} :: CreateCacheCluster)

-- | Specifies whether the nodes in the cluster are created in a single
-- outpost or across multiple outposts.
createCacheCluster_outpostMode :: Lens.Lens' CreateCacheCluster (Prelude.Maybe OutpostMode)
createCacheCluster_outpostMode :: Lens' CreateCacheCluster (Maybe OutpostMode)
createCacheCluster_outpostMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheCluster' {Maybe OutpostMode
outpostMode :: Maybe OutpostMode
$sel:outpostMode:CreateCacheCluster' :: CreateCacheCluster -> Maybe OutpostMode
outpostMode} -> Maybe OutpostMode
outpostMode) (\s :: CreateCacheCluster
s@CreateCacheCluster' {} Maybe OutpostMode
a -> CreateCacheCluster
s {$sel:outpostMode:CreateCacheCluster' :: Maybe OutpostMode
outpostMode = Maybe OutpostMode
a} :: CreateCacheCluster)

-- | The port number on which each of the cache nodes accepts connections.
createCacheCluster_port :: Lens.Lens' CreateCacheCluster (Prelude.Maybe Prelude.Int)
createCacheCluster_port :: Lens' CreateCacheCluster (Maybe Int)
createCacheCluster_port = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheCluster' {Maybe Int
port :: Maybe Int
$sel:port:CreateCacheCluster' :: CreateCacheCluster -> Maybe Int
port} -> Maybe Int
port) (\s :: CreateCacheCluster
s@CreateCacheCluster' {} Maybe Int
a -> CreateCacheCluster
s {$sel:port:CreateCacheCluster' :: Maybe Int
port = Maybe Int
a} :: CreateCacheCluster)

-- | The EC2 Availability Zone in which the cluster is created.
--
-- All nodes belonging to this cluster are placed in the preferred
-- Availability Zone. If you want to create your nodes across multiple
-- Availability Zones, use @PreferredAvailabilityZones@.
--
-- Default: System chosen Availability Zone.
createCacheCluster_preferredAvailabilityZone :: Lens.Lens' CreateCacheCluster (Prelude.Maybe Prelude.Text)
createCacheCluster_preferredAvailabilityZone :: Lens' CreateCacheCluster (Maybe Text)
createCacheCluster_preferredAvailabilityZone = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheCluster' {Maybe Text
preferredAvailabilityZone :: Maybe Text
$sel:preferredAvailabilityZone:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
preferredAvailabilityZone} -> Maybe Text
preferredAvailabilityZone) (\s :: CreateCacheCluster
s@CreateCacheCluster' {} Maybe Text
a -> CreateCacheCluster
s {$sel:preferredAvailabilityZone:CreateCacheCluster' :: Maybe Text
preferredAvailabilityZone = Maybe Text
a} :: CreateCacheCluster)

-- | A list of the Availability Zones in which cache nodes are created. The
-- order of the zones in the list is not important.
--
-- This option is only supported on Memcached.
--
-- If you are creating your cluster in an Amazon VPC (recommended) you can
-- only locate nodes in Availability Zones that are associated with the
-- subnets in the selected subnet group.
--
-- The number of Availability Zones listed must equal the value of
-- @NumCacheNodes@.
--
-- If you want all the nodes in the same Availability Zone, use
-- @PreferredAvailabilityZone@ instead, or repeat the Availability Zone
-- multiple times in the list.
--
-- Default: System chosen Availability Zones.
createCacheCluster_preferredAvailabilityZones :: Lens.Lens' CreateCacheCluster (Prelude.Maybe [Prelude.Text])
createCacheCluster_preferredAvailabilityZones :: Lens' CreateCacheCluster (Maybe [Text])
createCacheCluster_preferredAvailabilityZones = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheCluster' {Maybe [Text]
preferredAvailabilityZones :: Maybe [Text]
$sel:preferredAvailabilityZones:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Text]
preferredAvailabilityZones} -> Maybe [Text]
preferredAvailabilityZones) (\s :: CreateCacheCluster
s@CreateCacheCluster' {} Maybe [Text]
a -> CreateCacheCluster
s {$sel:preferredAvailabilityZones:CreateCacheCluster' :: Maybe [Text]
preferredAvailabilityZones = Maybe [Text]
a} :: CreateCacheCluster) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Specifies the weekly time range during which maintenance on the cluster
-- is performed. It is specified as a range in the format
-- ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window
-- is a 60 minute period.
createCacheCluster_preferredMaintenanceWindow :: Lens.Lens' CreateCacheCluster (Prelude.Maybe Prelude.Text)
createCacheCluster_preferredMaintenanceWindow :: Lens' CreateCacheCluster (Maybe Text)
createCacheCluster_preferredMaintenanceWindow = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheCluster' {Maybe Text
preferredMaintenanceWindow :: Maybe Text
$sel:preferredMaintenanceWindow:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
preferredMaintenanceWindow} -> Maybe Text
preferredMaintenanceWindow) (\s :: CreateCacheCluster
s@CreateCacheCluster' {} Maybe Text
a -> CreateCacheCluster
s {$sel:preferredMaintenanceWindow:CreateCacheCluster' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
a} :: CreateCacheCluster)

-- | The outpost ARN in which the cache cluster is created.
createCacheCluster_preferredOutpostArn :: Lens.Lens' CreateCacheCluster (Prelude.Maybe Prelude.Text)
createCacheCluster_preferredOutpostArn :: Lens' CreateCacheCluster (Maybe Text)
createCacheCluster_preferredOutpostArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheCluster' {Maybe Text
preferredOutpostArn :: Maybe Text
$sel:preferredOutpostArn:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
preferredOutpostArn} -> Maybe Text
preferredOutpostArn) (\s :: CreateCacheCluster
s@CreateCacheCluster' {} Maybe Text
a -> CreateCacheCluster
s {$sel:preferredOutpostArn:CreateCacheCluster' :: Maybe Text
preferredOutpostArn = Maybe Text
a} :: CreateCacheCluster)

-- | The outpost ARNs in which the cache cluster is created.
createCacheCluster_preferredOutpostArns :: Lens.Lens' CreateCacheCluster (Prelude.Maybe [Prelude.Text])
createCacheCluster_preferredOutpostArns :: Lens' CreateCacheCluster (Maybe [Text])
createCacheCluster_preferredOutpostArns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheCluster' {Maybe [Text]
preferredOutpostArns :: Maybe [Text]
$sel:preferredOutpostArns:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Text]
preferredOutpostArns} -> Maybe [Text]
preferredOutpostArns) (\s :: CreateCacheCluster
s@CreateCacheCluster' {} Maybe [Text]
a -> CreateCacheCluster
s {$sel:preferredOutpostArns:CreateCacheCluster' :: Maybe [Text]
preferredOutpostArns = Maybe [Text]
a} :: CreateCacheCluster) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ID of the replication group to which this cluster should belong. If
-- this parameter is specified, the cluster is added to the specified
-- replication group as a read replica; otherwise, the cluster is a
-- standalone primary that is not part of any replication group.
--
-- If the specified replication group is Multi-AZ enabled and the
-- Availability Zone is not specified, the cluster is created in
-- Availability Zones that provide the best spread of read replicas across
-- Availability Zones.
--
-- This parameter is only valid if the @Engine@ parameter is @redis@.
createCacheCluster_replicationGroupId :: Lens.Lens' CreateCacheCluster (Prelude.Maybe Prelude.Text)
createCacheCluster_replicationGroupId :: Lens' CreateCacheCluster (Maybe Text)
createCacheCluster_replicationGroupId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheCluster' {Maybe Text
replicationGroupId :: Maybe Text
$sel:replicationGroupId:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
replicationGroupId} -> Maybe Text
replicationGroupId) (\s :: CreateCacheCluster
s@CreateCacheCluster' {} Maybe Text
a -> CreateCacheCluster
s {$sel:replicationGroupId:CreateCacheCluster' :: Maybe Text
replicationGroupId = Maybe Text
a} :: CreateCacheCluster)

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

-- | A single-element string list containing an Amazon Resource Name (ARN)
-- that uniquely identifies a Redis RDB snapshot file stored in Amazon S3.
-- The snapshot file is used to populate the node group (shard). The Amazon
-- S3 object name in the ARN cannot contain any commas.
--
-- This parameter is only valid if the @Engine@ parameter is @redis@.
--
-- Example of an Amazon S3 ARN: @arn:aws:s3:::my_bucket\/snapshot1.rdb@
createCacheCluster_snapshotArns :: Lens.Lens' CreateCacheCluster (Prelude.Maybe [Prelude.Text])
createCacheCluster_snapshotArns :: Lens' CreateCacheCluster (Maybe [Text])
createCacheCluster_snapshotArns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheCluster' {Maybe [Text]
snapshotArns :: Maybe [Text]
$sel:snapshotArns:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Text]
snapshotArns} -> Maybe [Text]
snapshotArns) (\s :: CreateCacheCluster
s@CreateCacheCluster' {} Maybe [Text]
a -> CreateCacheCluster
s {$sel:snapshotArns:CreateCacheCluster' :: Maybe [Text]
snapshotArns = Maybe [Text]
a} :: CreateCacheCluster) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of a Redis snapshot from which to restore data into the new
-- node group (shard). The snapshot status changes to @restoring@ while the
-- new node group (shard) is being created.
--
-- This parameter is only valid if the @Engine@ parameter is @redis@.
createCacheCluster_snapshotName :: Lens.Lens' CreateCacheCluster (Prelude.Maybe Prelude.Text)
createCacheCluster_snapshotName :: Lens' CreateCacheCluster (Maybe Text)
createCacheCluster_snapshotName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheCluster' {Maybe Text
snapshotName :: Maybe Text
$sel:snapshotName:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
snapshotName} -> Maybe Text
snapshotName) (\s :: CreateCacheCluster
s@CreateCacheCluster' {} Maybe Text
a -> CreateCacheCluster
s {$sel:snapshotName:CreateCacheCluster' :: Maybe Text
snapshotName = Maybe Text
a} :: CreateCacheCluster)

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

-- | 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.
--
-- This parameter is only valid if the @Engine@ parameter is @redis@.
createCacheCluster_snapshotWindow :: Lens.Lens' CreateCacheCluster (Prelude.Maybe Prelude.Text)
createCacheCluster_snapshotWindow :: Lens' CreateCacheCluster (Maybe Text)
createCacheCluster_snapshotWindow = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheCluster' {Maybe Text
snapshotWindow :: Maybe Text
$sel:snapshotWindow:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
snapshotWindow} -> Maybe Text
snapshotWindow) (\s :: CreateCacheCluster
s@CreateCacheCluster' {} Maybe Text
a -> CreateCacheCluster
s {$sel:snapshotWindow:CreateCacheCluster' :: Maybe Text
snapshotWindow = Maybe Text
a} :: CreateCacheCluster)

-- | A list of tags to be added to this resource.
createCacheCluster_tags :: Lens.Lens' CreateCacheCluster (Prelude.Maybe [Tag])
createCacheCluster_tags :: Lens' CreateCacheCluster (Maybe [Tag])
createCacheCluster_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheCluster' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateCacheCluster
s@CreateCacheCluster' {} Maybe [Tag]
a -> CreateCacheCluster
s {$sel:tags:CreateCacheCluster' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateCacheCluster) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A flag that enables in-transit encryption when set to true.
--
-- Only available when creating a cache cluster in an Amazon VPC using
-- Memcached version 1.6.12 or later.
createCacheCluster_transitEncryptionEnabled :: Lens.Lens' CreateCacheCluster (Prelude.Maybe Prelude.Bool)
createCacheCluster_transitEncryptionEnabled :: Lens' CreateCacheCluster (Maybe Bool)
createCacheCluster_transitEncryptionEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheCluster' {Maybe Bool
transitEncryptionEnabled :: Maybe Bool
$sel:transitEncryptionEnabled:CreateCacheCluster' :: CreateCacheCluster -> Maybe Bool
transitEncryptionEnabled} -> Maybe Bool
transitEncryptionEnabled) (\s :: CreateCacheCluster
s@CreateCacheCluster' {} Maybe Bool
a -> CreateCacheCluster
s {$sel:transitEncryptionEnabled:CreateCacheCluster' :: Maybe Bool
transitEncryptionEnabled = Maybe Bool
a} :: CreateCacheCluster)

-- | The node group (shard) identifier. This parameter is stored as a
-- lowercase string.
--
-- __Constraints:__
--
-- -   A name must contain from 1 to 50 alphanumeric characters or hyphens.
--
-- -   The first character must be a letter.
--
-- -   A name cannot end with a hyphen or contain two consecutive hyphens.
createCacheCluster_cacheClusterId :: Lens.Lens' CreateCacheCluster Prelude.Text
createCacheCluster_cacheClusterId :: Lens' CreateCacheCluster Text
createCacheCluster_cacheClusterId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheCluster' {Text
cacheClusterId :: Text
$sel:cacheClusterId:CreateCacheCluster' :: CreateCacheCluster -> Text
cacheClusterId} -> Text
cacheClusterId) (\s :: CreateCacheCluster
s@CreateCacheCluster' {} Text
a -> CreateCacheCluster
s {$sel:cacheClusterId:CreateCacheCluster' :: Text
cacheClusterId = Text
a} :: CreateCacheCluster)

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

instance Prelude.Hashable CreateCacheCluster where
  hashWithSalt :: Int -> CreateCacheCluster -> Int
hashWithSalt Int
_salt CreateCacheCluster' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [LogDeliveryConfigurationRequest]
Maybe [Tag]
Maybe Text
Maybe AZMode
Maybe IpDiscovery
Maybe NetworkType
Maybe OutpostMode
Text
cacheClusterId :: Text
transitEncryptionEnabled :: Maybe Bool
tags :: Maybe [Tag]
snapshotWindow :: Maybe Text
snapshotRetentionLimit :: Maybe Int
snapshotName :: Maybe Text
snapshotArns :: Maybe [Text]
securityGroupIds :: Maybe [Text]
replicationGroupId :: Maybe Text
preferredOutpostArns :: Maybe [Text]
preferredOutpostArn :: Maybe Text
preferredMaintenanceWindow :: Maybe Text
preferredAvailabilityZones :: Maybe [Text]
preferredAvailabilityZone :: Maybe Text
port :: Maybe Int
outpostMode :: Maybe OutpostMode
numCacheNodes :: Maybe Int
notificationTopicArn :: Maybe Text
networkType :: Maybe NetworkType
logDeliveryConfigurations :: Maybe [LogDeliveryConfigurationRequest]
ipDiscovery :: Maybe IpDiscovery
engineVersion :: Maybe Text
engine :: Maybe Text
cacheSubnetGroupName :: Maybe Text
cacheSecurityGroupNames :: Maybe [Text]
cacheParameterGroupName :: Maybe Text
cacheNodeType :: Maybe Text
autoMinorVersionUpgrade :: Maybe Bool
authToken :: Maybe Text
aZMode :: Maybe AZMode
$sel:cacheClusterId:CreateCacheCluster' :: CreateCacheCluster -> Text
$sel:transitEncryptionEnabled:CreateCacheCluster' :: CreateCacheCluster -> Maybe Bool
$sel:tags:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Tag]
$sel:snapshotWindow:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:snapshotRetentionLimit:CreateCacheCluster' :: CreateCacheCluster -> Maybe Int
$sel:snapshotName:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:snapshotArns:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Text]
$sel:securityGroupIds:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Text]
$sel:replicationGroupId:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:preferredOutpostArns:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Text]
$sel:preferredOutpostArn:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:preferredMaintenanceWindow:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:preferredAvailabilityZones:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Text]
$sel:preferredAvailabilityZone:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:port:CreateCacheCluster' :: CreateCacheCluster -> Maybe Int
$sel:outpostMode:CreateCacheCluster' :: CreateCacheCluster -> Maybe OutpostMode
$sel:numCacheNodes:CreateCacheCluster' :: CreateCacheCluster -> Maybe Int
$sel:notificationTopicArn:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:networkType:CreateCacheCluster' :: CreateCacheCluster -> Maybe NetworkType
$sel:logDeliveryConfigurations:CreateCacheCluster' :: CreateCacheCluster -> Maybe [LogDeliveryConfigurationRequest]
$sel:ipDiscovery:CreateCacheCluster' :: CreateCacheCluster -> Maybe IpDiscovery
$sel:engineVersion:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:engine:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:cacheSubnetGroupName:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:cacheSecurityGroupNames:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Text]
$sel:cacheParameterGroupName:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:cacheNodeType:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:autoMinorVersionUpgrade:CreateCacheCluster' :: CreateCacheCluster -> Maybe Bool
$sel:authToken:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:aZMode:CreateCacheCluster' :: CreateCacheCluster -> Maybe AZMode
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AZMode
aZMode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
authToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
autoMinorVersionUpgrade
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cacheNodeType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cacheParameterGroupName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
cacheSecurityGroupNames
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cacheSubnetGroupName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
engine
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
engineVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe IpDiscovery
ipDiscovery
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NetworkType
networkType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
notificationTopicArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
numCacheNodes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OutpostMode
outpostMode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
port
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
preferredAvailabilityZone
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
preferredAvailabilityZones
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
preferredMaintenanceWindow
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
preferredOutpostArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
preferredOutpostArns
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
replicationGroupId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
securityGroupIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
snapshotArns
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
snapshotName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
snapshotRetentionLimit
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
snapshotWindow
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
transitEncryptionEnabled
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
cacheClusterId

instance Prelude.NFData CreateCacheCluster where
  rnf :: CreateCacheCluster -> ()
rnf CreateCacheCluster' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [LogDeliveryConfigurationRequest]
Maybe [Tag]
Maybe Text
Maybe AZMode
Maybe IpDiscovery
Maybe NetworkType
Maybe OutpostMode
Text
cacheClusterId :: Text
transitEncryptionEnabled :: Maybe Bool
tags :: Maybe [Tag]
snapshotWindow :: Maybe Text
snapshotRetentionLimit :: Maybe Int
snapshotName :: Maybe Text
snapshotArns :: Maybe [Text]
securityGroupIds :: Maybe [Text]
replicationGroupId :: Maybe Text
preferredOutpostArns :: Maybe [Text]
preferredOutpostArn :: Maybe Text
preferredMaintenanceWindow :: Maybe Text
preferredAvailabilityZones :: Maybe [Text]
preferredAvailabilityZone :: Maybe Text
port :: Maybe Int
outpostMode :: Maybe OutpostMode
numCacheNodes :: Maybe Int
notificationTopicArn :: Maybe Text
networkType :: Maybe NetworkType
logDeliveryConfigurations :: Maybe [LogDeliveryConfigurationRequest]
ipDiscovery :: Maybe IpDiscovery
engineVersion :: Maybe Text
engine :: Maybe Text
cacheSubnetGroupName :: Maybe Text
cacheSecurityGroupNames :: Maybe [Text]
cacheParameterGroupName :: Maybe Text
cacheNodeType :: Maybe Text
autoMinorVersionUpgrade :: Maybe Bool
authToken :: Maybe Text
aZMode :: Maybe AZMode
$sel:cacheClusterId:CreateCacheCluster' :: CreateCacheCluster -> Text
$sel:transitEncryptionEnabled:CreateCacheCluster' :: CreateCacheCluster -> Maybe Bool
$sel:tags:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Tag]
$sel:snapshotWindow:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:snapshotRetentionLimit:CreateCacheCluster' :: CreateCacheCluster -> Maybe Int
$sel:snapshotName:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:snapshotArns:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Text]
$sel:securityGroupIds:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Text]
$sel:replicationGroupId:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:preferredOutpostArns:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Text]
$sel:preferredOutpostArn:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:preferredMaintenanceWindow:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:preferredAvailabilityZones:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Text]
$sel:preferredAvailabilityZone:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:port:CreateCacheCluster' :: CreateCacheCluster -> Maybe Int
$sel:outpostMode:CreateCacheCluster' :: CreateCacheCluster -> Maybe OutpostMode
$sel:numCacheNodes:CreateCacheCluster' :: CreateCacheCluster -> Maybe Int
$sel:notificationTopicArn:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:networkType:CreateCacheCluster' :: CreateCacheCluster -> Maybe NetworkType
$sel:logDeliveryConfigurations:CreateCacheCluster' :: CreateCacheCluster -> Maybe [LogDeliveryConfigurationRequest]
$sel:ipDiscovery:CreateCacheCluster' :: CreateCacheCluster -> Maybe IpDiscovery
$sel:engineVersion:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:engine:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:cacheSubnetGroupName:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:cacheSecurityGroupNames:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Text]
$sel:cacheParameterGroupName:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:cacheNodeType:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:autoMinorVersionUpgrade:CreateCacheCluster' :: CreateCacheCluster -> Maybe Bool
$sel:authToken:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:aZMode:CreateCacheCluster' :: CreateCacheCluster -> Maybe AZMode
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AZMode
aZMode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
authToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
autoMinorVersionUpgrade
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cacheNodeType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cacheParameterGroupName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
cacheSecurityGroupNames
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cacheSubnetGroupName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
engine
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
engineVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IpDiscovery
ipDiscovery
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NetworkType
networkType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
notificationTopicArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
numCacheNodes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe OutpostMode
outpostMode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
port
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
preferredAvailabilityZone
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe [Text]
preferredAvailabilityZones
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
preferredMaintenanceWindow
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
preferredOutpostArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe [Text]
preferredOutpostArns
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
replicationGroupId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe [Text]
securityGroupIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe [Text]
snapshotArns
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
snapshotName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Int
snapshotRetentionLimit
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
snapshotWindow
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Bool
transitEncryptionEnabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Text
cacheClusterId

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

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

instance Data.ToQuery CreateCacheCluster where
  toQuery :: CreateCacheCluster -> QueryString
toQuery CreateCacheCluster' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [LogDeliveryConfigurationRequest]
Maybe [Tag]
Maybe Text
Maybe AZMode
Maybe IpDiscovery
Maybe NetworkType
Maybe OutpostMode
Text
cacheClusterId :: Text
transitEncryptionEnabled :: Maybe Bool
tags :: Maybe [Tag]
snapshotWindow :: Maybe Text
snapshotRetentionLimit :: Maybe Int
snapshotName :: Maybe Text
snapshotArns :: Maybe [Text]
securityGroupIds :: Maybe [Text]
replicationGroupId :: Maybe Text
preferredOutpostArns :: Maybe [Text]
preferredOutpostArn :: Maybe Text
preferredMaintenanceWindow :: Maybe Text
preferredAvailabilityZones :: Maybe [Text]
preferredAvailabilityZone :: Maybe Text
port :: Maybe Int
outpostMode :: Maybe OutpostMode
numCacheNodes :: Maybe Int
notificationTopicArn :: Maybe Text
networkType :: Maybe NetworkType
logDeliveryConfigurations :: Maybe [LogDeliveryConfigurationRequest]
ipDiscovery :: Maybe IpDiscovery
engineVersion :: Maybe Text
engine :: Maybe Text
cacheSubnetGroupName :: Maybe Text
cacheSecurityGroupNames :: Maybe [Text]
cacheParameterGroupName :: Maybe Text
cacheNodeType :: Maybe Text
autoMinorVersionUpgrade :: Maybe Bool
authToken :: Maybe Text
aZMode :: Maybe AZMode
$sel:cacheClusterId:CreateCacheCluster' :: CreateCacheCluster -> Text
$sel:transitEncryptionEnabled:CreateCacheCluster' :: CreateCacheCluster -> Maybe Bool
$sel:tags:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Tag]
$sel:snapshotWindow:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:snapshotRetentionLimit:CreateCacheCluster' :: CreateCacheCluster -> Maybe Int
$sel:snapshotName:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:snapshotArns:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Text]
$sel:securityGroupIds:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Text]
$sel:replicationGroupId:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:preferredOutpostArns:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Text]
$sel:preferredOutpostArn:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:preferredMaintenanceWindow:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:preferredAvailabilityZones:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Text]
$sel:preferredAvailabilityZone:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:port:CreateCacheCluster' :: CreateCacheCluster -> Maybe Int
$sel:outpostMode:CreateCacheCluster' :: CreateCacheCluster -> Maybe OutpostMode
$sel:numCacheNodes:CreateCacheCluster' :: CreateCacheCluster -> Maybe Int
$sel:notificationTopicArn:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:networkType:CreateCacheCluster' :: CreateCacheCluster -> Maybe NetworkType
$sel:logDeliveryConfigurations:CreateCacheCluster' :: CreateCacheCluster -> Maybe [LogDeliveryConfigurationRequest]
$sel:ipDiscovery:CreateCacheCluster' :: CreateCacheCluster -> Maybe IpDiscovery
$sel:engineVersion:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:engine:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:cacheSubnetGroupName:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:cacheSecurityGroupNames:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Text]
$sel:cacheParameterGroupName:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:cacheNodeType:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:autoMinorVersionUpgrade:CreateCacheCluster' :: CreateCacheCluster -> Maybe Bool
$sel:authToken:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:aZMode:CreateCacheCluster' :: CreateCacheCluster -> Maybe AZMode
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"CreateCacheCluster" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2015-02-02" :: Prelude.ByteString),
        ByteString
"AZMode" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe AZMode
aZMode,
        ByteString
"AuthToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
authToken,
        ByteString
"AutoMinorVersionUpgrade"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
autoMinorVersionUpgrade,
        ByteString
"CacheNodeType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
cacheNodeType,
        ByteString
"CacheParameterGroupName"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
cacheParameterGroupName,
        ByteString
"CacheSecurityGroupNames"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"CacheSecurityGroupName"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
cacheSecurityGroupNames
            ),
        ByteString
"CacheSubnetGroupName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
cacheSubnetGroupName,
        ByteString
"Engine" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
engine,
        ByteString
"EngineVersion" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
engineVersion,
        ByteString
"IpDiscovery" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe IpDiscovery
ipDiscovery,
        ByteString
"LogDeliveryConfigurations"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"LogDeliveryConfigurationRequest"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations
            ),
        ByteString
"NetworkType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe NetworkType
networkType,
        ByteString
"NotificationTopicArn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
notificationTopicArn,
        ByteString
"NumCacheNodes" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
numCacheNodes,
        ByteString
"OutpostMode" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe OutpostMode
outpostMode,
        ByteString
"Port" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
port,
        ByteString
"PreferredAvailabilityZone"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
preferredAvailabilityZone,
        ByteString
"PreferredAvailabilityZones"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"PreferredAvailabilityZone"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
preferredAvailabilityZones
            ),
        ByteString
"PreferredMaintenanceWindow"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
preferredMaintenanceWindow,
        ByteString
"PreferredOutpostArn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
preferredOutpostArn,
        ByteString
"PreferredOutpostArns"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"PreferredOutpostArn"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
preferredOutpostArns
            ),
        ByteString
"ReplicationGroupId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
replicationGroupId,
        ByteString
"SecurityGroupIds"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"SecurityGroupId"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
securityGroupIds
            ),
        ByteString
"SnapshotArns"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"SnapshotArn"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
snapshotArns
            ),
        ByteString
"SnapshotName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
snapshotName,
        ByteString
"SnapshotRetentionLimit"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
snapshotRetentionLimit,
        ByteString
"SnapshotWindow" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
snapshotWindow,
        ByteString
"Tags"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"Tag" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
        ByteString
"TransitEncryptionEnabled"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
transitEncryptionEnabled,
        ByteString
"CacheClusterId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
cacheClusterId
      ]

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

-- |
-- Create a value of 'CreateCacheClusterResponse' 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:
--
-- 'cacheCluster', 'createCacheClusterResponse_cacheCluster' - Undocumented member.
--
-- 'httpStatus', 'createCacheClusterResponse_httpStatus' - The response's http status code.
newCreateCacheClusterResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateCacheClusterResponse
newCreateCacheClusterResponse :: Int -> CreateCacheClusterResponse
newCreateCacheClusterResponse Int
pHttpStatus_ =
  CreateCacheClusterResponse'
    { $sel:cacheCluster:CreateCacheClusterResponse' :: Maybe CacheCluster
cacheCluster =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateCacheClusterResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
createCacheClusterResponse_cacheCluster :: Lens.Lens' CreateCacheClusterResponse (Prelude.Maybe CacheCluster)
createCacheClusterResponse_cacheCluster :: Lens' CreateCacheClusterResponse (Maybe CacheCluster)
createCacheClusterResponse_cacheCluster = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCacheClusterResponse' {Maybe CacheCluster
cacheCluster :: Maybe CacheCluster
$sel:cacheCluster:CreateCacheClusterResponse' :: CreateCacheClusterResponse -> Maybe CacheCluster
cacheCluster} -> Maybe CacheCluster
cacheCluster) (\s :: CreateCacheClusterResponse
s@CreateCacheClusterResponse' {} Maybe CacheCluster
a -> CreateCacheClusterResponse
s {$sel:cacheCluster:CreateCacheClusterResponse' :: Maybe CacheCluster
cacheCluster = Maybe CacheCluster
a} :: CreateCacheClusterResponse)

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

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