{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a 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_engineVersion,
    createCacheCluster_cacheNodeType,
    createCacheCluster_securityGroupIds,
    createCacheCluster_snapshotArns,
    createCacheCluster_autoMinorVersionUpgrade,
    createCacheCluster_outpostMode,
    createCacheCluster_cacheParameterGroupName,
    createCacheCluster_snapshotWindow,
    createCacheCluster_logDeliveryConfigurations,
    createCacheCluster_authToken,
    createCacheCluster_engine,
    createCacheCluster_preferredAvailabilityZones,
    createCacheCluster_preferredMaintenanceWindow,
    createCacheCluster_cacheSubnetGroupName,
    createCacheCluster_preferredAvailabilityZone,
    createCacheCluster_snapshotRetentionLimit,
    createCacheCluster_preferredOutpostArns,
    createCacheCluster_aZMode,
    createCacheCluster_snapshotName,
    createCacheCluster_preferredOutpostArn,
    createCacheCluster_replicationGroupId,
    createCacheCluster_notificationTopicArn,
    createCacheCluster_numCacheNodes,
    createCacheCluster_tags,
    createCacheCluster_port,
    createCacheCluster_cacheSecurityGroupNames,
    createCacheCluster_cacheClusterId,

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

    -- * Response Lenses
    createCacheClusterResponse_cacheCluster,
    createCacheClusterResponse_httpStatus,
  )
where

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

-- | Represents the input of a CreateCacheCluster operation.
--
-- /See:/ 'newCreateCacheCluster' smart constructor.
data CreateCacheCluster = 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 -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
    -- | The compute and memory capacity of the nodes in the node group (shard).
    --
    -- The following node types are supported by ElastiCache. Generally
    -- speaking, the current generation types provide more memory and
    -- computational power at lower cost when compared to their equivalent
    -- previous generation counterparts.
    --
    -- -   General purpose:
    --
    --     -   Current generation:
    --
    --         __M6g node types__ (available only for Redis engine version
    --         5.0.6 onward and for Memcached engine version 1.5.16 onward).
    --
    --         @cache.m6g.large@, @cache.m6g.xlarge@, @cache.m6g.2xlarge@,
    --         @cache.m6g.4xlarge@, @cache.m6g.8xlarge@, @cache.m6g.12xlarge@,
    --         @cache.m6g.16xlarge@
    --
    --         For region availability, see
    --         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
    --
    --         __M5 node types:__ @cache.m5.large@, @cache.m5.xlarge@,
    --         @cache.m5.2xlarge@, @cache.m5.4xlarge@, @cache.m5.12xlarge@,
    --         @cache.m5.24xlarge@
    --
    --         __M4 node types:__ @cache.m4.large@, @cache.m4.xlarge@,
    --         @cache.m4.2xlarge@, @cache.m4.4xlarge@, @cache.m4.10xlarge@
    --
    --         __T3 node types:__ @cache.t3.micro@, @cache.t3.small@,
    --         @cache.t3.medium@
    --
    --         __T2 node types:__ @cache.t2.micro@, @cache.t2.small@,
    --         @cache.t2.medium@
    --
    --     -   Previous generation: (not recommended)
    --
    --         __T1 node types:__ @cache.t1.micro@
    --
    --         __M1 node types:__ @cache.m1.small@, @cache.m1.medium@,
    --         @cache.m1.large@, @cache.m1.xlarge@
    --
    --         __M3 node types:__ @cache.m3.medium@, @cache.m3.large@,
    --         @cache.m3.xlarge@, @cache.m3.2xlarge@
    --
    -- -   Compute optimized:
    --
    --     -   Previous generation: (not recommended)
    --
    --         __C1 node types:__ @cache.c1.xlarge@
    --
    -- -   Memory optimized:
    --
    --     -   Current generation:
    --
    --         __R6g node types__ (available only for Redis engine version
    --         5.0.6 onward and for Memcached engine version 1.5.16 onward).
    --
    --         @cache.r6g.large@, @cache.r6g.xlarge@, @cache.r6g.2xlarge@,
    --         @cache.r6g.4xlarge@, @cache.r6g.8xlarge@, @cache.r6g.12xlarge@,
    --         @cache.r6g.16xlarge@
    --
    --         For region availability, see
    --         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
    --
    --         __R5 node types:__ @cache.r5.large@, @cache.r5.xlarge@,
    --         @cache.r5.2xlarge@, @cache.r5.4xlarge@, @cache.r5.12xlarge@,
    --         @cache.r5.24xlarge@
    --
    --         __R4 node types:__ @cache.r4.large@, @cache.r4.xlarge@,
    --         @cache.r4.2xlarge@, @cache.r4.4xlarge@, @cache.r4.8xlarge@,
    --         @cache.r4.16xlarge@
    --
    --     -   Previous generation: (not recommended)
    --
    --         __M2 node types:__ @cache.m2.xlarge@, @cache.m2.2xlarge@,
    --         @cache.m2.4xlarge@
    --
    --         __R3 node types:__ @cache.r3.large@, @cache.r3.xlarge@,
    --         @cache.r3.2xlarge@, @cache.r3.4xlarge@, @cache.r3.8xlarge@
    --
    -- __Additional node type info__
    --
    -- -   All current generation instance types are created in Amazon VPC by
    --     default.
    --
    -- -   Redis append-only files (AOF) are not supported for T1 or T2
    --     instances.
    --
    -- -   Redis Multi-AZ with automatic failover is not supported on T1
    --     instances.
    --
    -- -   Redis configuration variables @appendonly@ and @appendfsync@ are not
    --     supported on Redis version 2.8.22 and later.
    CreateCacheCluster -> Maybe Text
cacheNodeType :: 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],
    -- | This parameter is currently disabled.
    CreateCacheCluster -> Maybe Bool
autoMinorVersionUpgrade :: Prelude.Maybe Prelude.Bool,
    -- | 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 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,
    -- | 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,
    -- | Specifies the destination, format and type of the logs.
    CreateCacheCluster -> Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations :: Prelude.Maybe [LogDeliveryConfigurationRequest],
    -- | __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,
    -- | 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,
    -- | 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. Valid values for @ddd@ are:
    CreateCacheCluster -> Maybe Text
preferredMaintenanceWindow :: 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 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,
    -- | 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 outpost ARNs in which the cache cluster is created.
    CreateCacheCluster -> Maybe [Text]
preferredOutpostArns :: Prelude.Maybe [Prelude.Text],
    -- | 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,
    -- | 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 outpost ARN in which the cache cluster is created.
    CreateCacheCluster -> Maybe Text
preferredOutpostArn :: 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,
    -- | 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,
    -- | A list of tags to be added to this resource.
    CreateCacheCluster -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The port number on which each of the cache nodes accepts connections.
    CreateCacheCluster -> Maybe Int
port :: Prelude.Maybe Prelude.Int,
    -- | 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 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
(CreateCacheCluster -> CreateCacheCluster -> Bool)
-> (CreateCacheCluster -> CreateCacheCluster -> Bool)
-> Eq CreateCacheCluster
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]
(Int -> ReadS CreateCacheCluster)
-> ReadS [CreateCacheCluster]
-> ReadPrec CreateCacheCluster
-> ReadPrec [CreateCacheCluster]
-> Read 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
(Int -> CreateCacheCluster -> ShowS)
-> (CreateCacheCluster -> String)
-> ([CreateCacheCluster] -> ShowS)
-> Show CreateCacheCluster
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. CreateCacheCluster -> Rep CreateCacheCluster x)
-> (forall x. Rep CreateCacheCluster x -> CreateCacheCluster)
-> Generic CreateCacheCluster
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:
--
-- '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.
--
-- '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@
--
--         __T3 node types:__ @cache.t3.micro@, @cache.t3.small@,
--         @cache.t3.medium@
--
--         __T2 node types:__ @cache.t2.micro@, @cache.t2.small@,
--         @cache.t2.medium@
--
--     -   Previous generation: (not recommended)
--
--         __T1 node types:__ @cache.t1.micro@
--
--         __M1 node types:__ @cache.m1.small@, @cache.m1.medium@,
--         @cache.m1.large@, @cache.m1.xlarge@
--
--         __M3 node types:__ @cache.m3.medium@, @cache.m3.large@,
--         @cache.m3.xlarge@, @cache.m3.2xlarge@
--
-- -   Compute optimized:
--
--     -   Previous generation: (not recommended)
--
--         __C1 node types:__ @cache.c1.xlarge@
--
-- -   Memory optimized:
--
--     -   Current generation:
--
--         __R6g node types__ (available only for Redis engine version
--         5.0.6 onward and for Memcached engine version 1.5.16 onward).
--
--         @cache.r6g.large@, @cache.r6g.xlarge@, @cache.r6g.2xlarge@,
--         @cache.r6g.4xlarge@, @cache.r6g.8xlarge@, @cache.r6g.12xlarge@,
--         @cache.r6g.16xlarge@
--
--         For region availability, see
--         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
--
--         __R5 node types:__ @cache.r5.large@, @cache.r5.xlarge@,
--         @cache.r5.2xlarge@, @cache.r5.4xlarge@, @cache.r5.12xlarge@,
--         @cache.r5.24xlarge@
--
--         __R4 node types:__ @cache.r4.large@, @cache.r4.xlarge@,
--         @cache.r4.2xlarge@, @cache.r4.4xlarge@, @cache.r4.8xlarge@,
--         @cache.r4.16xlarge@
--
--     -   Previous generation: (not recommended)
--
--         __M2 node types:__ @cache.m2.xlarge@, @cache.m2.2xlarge@,
--         @cache.m2.4xlarge@
--
--         __R3 node types:__ @cache.r3.large@, @cache.r3.xlarge@,
--         @cache.r3.2xlarge@, @cache.r3.4xlarge@, @cache.r3.8xlarge@
--
-- __Additional node type info__
--
-- -   All current generation instance types are created in Amazon VPC by
--     default.
--
-- -   Redis append-only files (AOF) are not supported for T1 or T2
--     instances.
--
-- -   Redis Multi-AZ with automatic failover is not supported on T1
--     instances.
--
-- -   Redis configuration variables @appendonly@ and @appendfsync@ are not
--     supported on Redis version 2.8.22 and later.
--
-- '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@
--
-- 'autoMinorVersionUpgrade', 'createCacheCluster_autoMinorVersionUpgrade' - This parameter is currently disabled.
--
-- 'outpostMode', 'createCacheCluster_outpostMode' - Specifies whether the nodes in the cluster are created in a single
-- outpost or across multiple outposts.
--
-- '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.
--
-- '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@.
--
-- 'logDeliveryConfigurations', 'createCacheCluster_logDeliveryConfigurations' - Specifies the destination, format and type of the logs.
--
-- '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.
--
-- 'engine', 'createCacheCluster_engine' - The name of the cache engine to be used for this cluster.
--
-- Valid values for this parameter are: @memcached@ | @redis@
--
-- '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. Valid values for @ddd@ are:
--
-- '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>.
--
-- '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.
--
-- '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).
--
-- 'preferredOutpostArns', 'createCacheCluster_preferredOutpostArns' - The outpost ARNs in which the cache cluster is created.
--
-- '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.
--
-- '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@.
--
-- 'preferredOutpostArn', 'createCacheCluster_preferredOutpostArn' - The outpost ARN 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@.
--
-- '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/>.
--
-- 'tags', 'createCacheCluster_tags' - A list of tags to be added to this resource.
--
-- 'port', 'createCacheCluster_port' - The port number on which each of the cache nodes accepts connections.
--
-- '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).
--
-- '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' :: Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe OutpostMode
-> Maybe Text
-> Maybe Text
-> Maybe [LogDeliveryConfigurationRequest]
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe [Text]
-> Maybe AZMode
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe [Tag]
-> Maybe Int
-> Maybe [Text]
-> Text
-> CreateCacheCluster
CreateCacheCluster'
    { $sel:engineVersion:CreateCacheCluster' :: Maybe Text
engineVersion =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheNodeType:CreateCacheCluster' :: Maybe Text
cacheNodeType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:securityGroupIds:CreateCacheCluster' :: Maybe [Text]
securityGroupIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotArns:CreateCacheCluster' :: Maybe [Text]
snapshotArns = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:autoMinorVersionUpgrade:CreateCacheCluster' :: Maybe Bool
autoMinorVersionUpgrade = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:outpostMode:CreateCacheCluster' :: Maybe OutpostMode
outpostMode = Maybe OutpostMode
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheParameterGroupName:CreateCacheCluster' :: Maybe Text
cacheParameterGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotWindow:CreateCacheCluster' :: Maybe Text
snapshotWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:logDeliveryConfigurations:CreateCacheCluster' :: Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations = Maybe [LogDeliveryConfigurationRequest]
forall a. Maybe a
Prelude.Nothing,
      $sel:authToken:CreateCacheCluster' :: Maybe Text
authToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:engine:CreateCacheCluster' :: Maybe Text
engine = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:preferredAvailabilityZones:CreateCacheCluster' :: Maybe [Text]
preferredAvailabilityZones = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:preferredMaintenanceWindow:CreateCacheCluster' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheSubnetGroupName:CreateCacheCluster' :: Maybe Text
cacheSubnetGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:preferredAvailabilityZone:CreateCacheCluster' :: Maybe Text
preferredAvailabilityZone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotRetentionLimit:CreateCacheCluster' :: Maybe Int
snapshotRetentionLimit = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:preferredOutpostArns:CreateCacheCluster' :: Maybe [Text]
preferredOutpostArns = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:aZMode:CreateCacheCluster' :: Maybe AZMode
aZMode = Maybe AZMode
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotName:CreateCacheCluster' :: Maybe Text
snapshotName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:preferredOutpostArn:CreateCacheCluster' :: Maybe Text
preferredOutpostArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationGroupId:CreateCacheCluster' :: Maybe Text
replicationGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:notificationTopicArn:CreateCacheCluster' :: Maybe Text
notificationTopicArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:numCacheNodes:CreateCacheCluster' :: Maybe Int
numCacheNodes = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateCacheCluster' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:port:CreateCacheCluster' :: Maybe Int
port = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheSecurityGroupNames:CreateCacheCluster' :: Maybe [Text]
cacheSecurityGroupNames = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheClusterId:CreateCacheCluster' :: Text
cacheClusterId = Text
pCacheClusterId_
    }

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

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

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

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

-- | 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 :: (Maybe OutpostMode -> f (Maybe OutpostMode))
-> CreateCacheCluster -> f CreateCacheCluster
createCacheCluster_outpostMode = (CreateCacheCluster -> Maybe OutpostMode)
-> (CreateCacheCluster -> Maybe OutpostMode -> CreateCacheCluster)
-> Lens
     CreateCacheCluster
     CreateCacheCluster
     (Maybe OutpostMode)
     (Maybe 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 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 :: (Maybe Text -> f (Maybe Text))
-> CreateCacheCluster -> f CreateCacheCluster
createCacheCluster_cacheParameterGroupName = (CreateCacheCluster -> Maybe Text)
-> (CreateCacheCluster -> Maybe Text -> CreateCacheCluster)
-> Lens
     CreateCacheCluster CreateCacheCluster (Maybe Text) (Maybe Text)
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)

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

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

-- | __Reserved parameter.__ The password used to access a password protected
-- server.
--
-- 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 :: (Maybe Text -> f (Maybe Text))
-> CreateCacheCluster -> f CreateCacheCluster
createCacheCluster_authToken = (CreateCacheCluster -> Maybe Text)
-> (CreateCacheCluster -> Maybe Text -> CreateCacheCluster)
-> Lens
     CreateCacheCluster CreateCacheCluster (Maybe Text) (Maybe Text)
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)

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

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

-- | Specifies the weekly time range during which maintenance on the cluster
-- is performed. It is specified as a range in the format
-- ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window
-- is a 60 minute period. Valid values for @ddd@ are:
createCacheCluster_preferredMaintenanceWindow :: Lens.Lens' CreateCacheCluster (Prelude.Maybe Prelude.Text)
createCacheCluster_preferredMaintenanceWindow :: (Maybe Text -> f (Maybe Text))
-> CreateCacheCluster -> f CreateCacheCluster
createCacheCluster_preferredMaintenanceWindow = (CreateCacheCluster -> Maybe Text)
-> (CreateCacheCluster -> Maybe Text -> CreateCacheCluster)
-> Lens
     CreateCacheCluster CreateCacheCluster (Maybe Text) (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text))
-> CreateCacheCluster -> f CreateCacheCluster
createCacheCluster_cacheSubnetGroupName = (CreateCacheCluster -> Maybe Text)
-> (CreateCacheCluster -> Maybe Text -> CreateCacheCluster)
-> Lens
     CreateCacheCluster CreateCacheCluster (Maybe Text) (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text))
-> CreateCacheCluster -> f CreateCacheCluster
createCacheCluster_preferredAvailabilityZone = (CreateCacheCluster -> Maybe Text)
-> (CreateCacheCluster -> Maybe Text -> CreateCacheCluster)
-> Lens
     CreateCacheCluster CreateCacheCluster (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Int -> f (Maybe Int))
-> CreateCacheCluster -> f CreateCacheCluster
createCacheCluster_snapshotRetentionLimit = (CreateCacheCluster -> Maybe Int)
-> (CreateCacheCluster -> Maybe Int -> CreateCacheCluster)
-> Lens
     CreateCacheCluster CreateCacheCluster (Maybe Int) (Maybe Int)
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 outpost ARNs in which the cache cluster is created.
createCacheCluster_preferredOutpostArns :: Lens.Lens' CreateCacheCluster (Prelude.Maybe [Prelude.Text])
createCacheCluster_preferredOutpostArns :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateCacheCluster -> f CreateCacheCluster
createCacheCluster_preferredOutpostArns = (CreateCacheCluster -> Maybe [Text])
-> (CreateCacheCluster -> Maybe [Text] -> CreateCacheCluster)
-> Lens
     CreateCacheCluster CreateCacheCluster (Maybe [Text]) (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateCacheCluster -> f CreateCacheCluster)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateCacheCluster
-> f CreateCacheCluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: (Maybe AZMode -> f (Maybe AZMode))
-> CreateCacheCluster -> f CreateCacheCluster
createCacheCluster_aZMode = (CreateCacheCluster -> Maybe AZMode)
-> (CreateCacheCluster -> Maybe AZMode -> CreateCacheCluster)
-> Lens
     CreateCacheCluster CreateCacheCluster (Maybe AZMode) (Maybe 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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> CreateCacheCluster -> f CreateCacheCluster
createCacheCluster_snapshotName = (CreateCacheCluster -> Maybe Text)
-> (CreateCacheCluster -> Maybe Text -> CreateCacheCluster)
-> Lens
     CreateCacheCluster CreateCacheCluster (Maybe Text) (Maybe Text)
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 outpost ARN in which the cache cluster is created.
createCacheCluster_preferredOutpostArn :: Lens.Lens' CreateCacheCluster (Prelude.Maybe Prelude.Text)
createCacheCluster_preferredOutpostArn :: (Maybe Text -> f (Maybe Text))
-> CreateCacheCluster -> f CreateCacheCluster
createCacheCluster_preferredOutpostArn = (CreateCacheCluster -> Maybe Text)
-> (CreateCacheCluster -> Maybe Text -> CreateCacheCluster)
-> Lens
     CreateCacheCluster CreateCacheCluster (Maybe Text) (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text))
-> CreateCacheCluster -> f CreateCacheCluster
createCacheCluster_replicationGroupId = (CreateCacheCluster -> Maybe Text)
-> (CreateCacheCluster -> Maybe Text -> CreateCacheCluster)
-> Lens
     CreateCacheCluster CreateCacheCluster (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> CreateCacheCluster -> f CreateCacheCluster
createCacheCluster_notificationTopicArn = (CreateCacheCluster -> Maybe Text)
-> (CreateCacheCluster -> Maybe Text -> CreateCacheCluster)
-> Lens
     CreateCacheCluster CreateCacheCluster (Maybe Text) (Maybe Text)
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 :: (Maybe Int -> f (Maybe Int))
-> CreateCacheCluster -> f CreateCacheCluster
createCacheCluster_numCacheNodes = (CreateCacheCluster -> Maybe Int)
-> (CreateCacheCluster -> Maybe Int -> CreateCacheCluster)
-> Lens
     CreateCacheCluster CreateCacheCluster (Maybe Int) (Maybe Int)
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)

-- | A list of tags to be added to this resource.
createCacheCluster_tags :: Lens.Lens' CreateCacheCluster (Prelude.Maybe [Tag])
createCacheCluster_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateCacheCluster -> f CreateCacheCluster
createCacheCluster_tags = (CreateCacheCluster -> Maybe [Tag])
-> (CreateCacheCluster -> Maybe [Tag] -> CreateCacheCluster)
-> Lens
     CreateCacheCluster CreateCacheCluster (Maybe [Tag]) (Maybe [Tag])
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) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateCacheCluster -> f CreateCacheCluster)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateCacheCluster
-> f CreateCacheCluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The port number on which each of the cache nodes accepts connections.
createCacheCluster_port :: Lens.Lens' CreateCacheCluster (Prelude.Maybe Prelude.Int)
createCacheCluster_port :: (Maybe Int -> f (Maybe Int))
-> CreateCacheCluster -> f CreateCacheCluster
createCacheCluster_port = (CreateCacheCluster -> Maybe Int)
-> (CreateCacheCluster -> Maybe Int -> CreateCacheCluster)
-> Lens
     CreateCacheCluster CreateCacheCluster (Maybe Int) (Maybe Int)
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)

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

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

instance Prelude.Hashable CreateCacheCluster

instance Prelude.NFData CreateCacheCluster

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

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

instance Core.ToQuery CreateCacheCluster where
  toQuery :: CreateCacheCluster -> QueryString
toQuery CreateCacheCluster' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [LogDeliveryConfigurationRequest]
Maybe [Tag]
Maybe Text
Maybe AZMode
Maybe OutpostMode
Text
cacheClusterId :: Text
cacheSecurityGroupNames :: Maybe [Text]
port :: Maybe Int
tags :: Maybe [Tag]
numCacheNodes :: Maybe Int
notificationTopicArn :: Maybe Text
replicationGroupId :: Maybe Text
preferredOutpostArn :: Maybe Text
snapshotName :: Maybe Text
aZMode :: Maybe AZMode
preferredOutpostArns :: Maybe [Text]
snapshotRetentionLimit :: Maybe Int
preferredAvailabilityZone :: Maybe Text
cacheSubnetGroupName :: Maybe Text
preferredMaintenanceWindow :: Maybe Text
preferredAvailabilityZones :: Maybe [Text]
engine :: Maybe Text
authToken :: Maybe Text
logDeliveryConfigurations :: Maybe [LogDeliveryConfigurationRequest]
snapshotWindow :: Maybe Text
cacheParameterGroupName :: Maybe Text
outpostMode :: Maybe OutpostMode
autoMinorVersionUpgrade :: Maybe Bool
snapshotArns :: Maybe [Text]
securityGroupIds :: Maybe [Text]
cacheNodeType :: Maybe Text
engineVersion :: Maybe Text
$sel:cacheClusterId:CreateCacheCluster' :: CreateCacheCluster -> Text
$sel:cacheSecurityGroupNames:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Text]
$sel:port:CreateCacheCluster' :: CreateCacheCluster -> Maybe Int
$sel:tags:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Tag]
$sel:numCacheNodes:CreateCacheCluster' :: CreateCacheCluster -> Maybe Int
$sel:notificationTopicArn:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:replicationGroupId:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:preferredOutpostArn:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:snapshotName:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:aZMode:CreateCacheCluster' :: CreateCacheCluster -> Maybe AZMode
$sel:preferredOutpostArns:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Text]
$sel:snapshotRetentionLimit:CreateCacheCluster' :: CreateCacheCluster -> Maybe Int
$sel:preferredAvailabilityZone:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:cacheSubnetGroupName:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:preferredMaintenanceWindow:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:preferredAvailabilityZones:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Text]
$sel:engine:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:authToken:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:logDeliveryConfigurations:CreateCacheCluster' :: CreateCacheCluster -> Maybe [LogDeliveryConfigurationRequest]
$sel:snapshotWindow:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:cacheParameterGroupName:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:outpostMode:CreateCacheCluster' :: CreateCacheCluster -> Maybe OutpostMode
$sel:autoMinorVersionUpgrade:CreateCacheCluster' :: CreateCacheCluster -> Maybe Bool
$sel:snapshotArns:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Text]
$sel:securityGroupIds:CreateCacheCluster' :: CreateCacheCluster -> Maybe [Text]
$sel:cacheNodeType:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
$sel:engineVersion:CreateCacheCluster' :: CreateCacheCluster -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"CreateCacheCluster" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2015-02-02" :: Prelude.ByteString),
        ByteString
"EngineVersion" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
engineVersion,
        ByteString
"CacheNodeType" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
cacheNodeType,
        ByteString
"SecurityGroupIds"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"SecurityGroupId"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
securityGroupIds
            ),
        ByteString
"SnapshotArns"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"SnapshotArn"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
snapshotArns
            ),
        ByteString
"AutoMinorVersionUpgrade"
          ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
autoMinorVersionUpgrade,
        ByteString
"OutpostMode" ByteString -> Maybe OutpostMode -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe OutpostMode
outpostMode,
        ByteString
"CacheParameterGroupName"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
cacheParameterGroupName,
        ByteString
"SnapshotWindow" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
snapshotWindow,
        ByteString
"LogDeliveryConfigurations"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [LogDeliveryConfigurationRequest] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"LogDeliveryConfigurationRequest"
                ([LogDeliveryConfigurationRequest] -> QueryString)
-> Maybe [LogDeliveryConfigurationRequest] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations
            ),
        ByteString
"AuthToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
authToken,
        ByteString
"Engine" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
engine,
        ByteString
"PreferredAvailabilityZones"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"PreferredAvailabilityZone"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
preferredAvailabilityZones
            ),
        ByteString
"PreferredMaintenanceWindow"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
preferredMaintenanceWindow,
        ByteString
"CacheSubnetGroupName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
cacheSubnetGroupName,
        ByteString
"PreferredAvailabilityZone"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
preferredAvailabilityZone,
        ByteString
"SnapshotRetentionLimit"
          ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
snapshotRetentionLimit,
        ByteString
"PreferredOutpostArns"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"PreferredOutpostArn"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
preferredOutpostArns
            ),
        ByteString
"AZMode" ByteString -> Maybe AZMode -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe AZMode
aZMode,
        ByteString
"SnapshotName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
snapshotName,
        ByteString
"PreferredOutpostArn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
preferredOutpostArn,
        ByteString
"ReplicationGroupId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
replicationGroupId,
        ByteString
"NotificationTopicArn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
notificationTopicArn,
        ByteString
"NumCacheNodes" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
numCacheNodes,
        ByteString
"Tags"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [Tag] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"Tag" ([Tag] -> QueryString) -> Maybe [Tag] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
        ByteString
"Port" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
port,
        ByteString
"CacheSecurityGroupNames"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"CacheSecurityGroupName"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
cacheSecurityGroupNames
            ),
        ByteString
"CacheClusterId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: 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
(CreateCacheClusterResponse -> CreateCacheClusterResponse -> Bool)
-> (CreateCacheClusterResponse
    -> CreateCacheClusterResponse -> Bool)
-> Eq CreateCacheClusterResponse
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]
(Int -> ReadS CreateCacheClusterResponse)
-> ReadS [CreateCacheClusterResponse]
-> ReadPrec CreateCacheClusterResponse
-> ReadPrec [CreateCacheClusterResponse]
-> Read 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
(Int -> CreateCacheClusterResponse -> ShowS)
-> (CreateCacheClusterResponse -> String)
-> ([CreateCacheClusterResponse] -> ShowS)
-> Show CreateCacheClusterResponse
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.
 CreateCacheClusterResponse -> Rep CreateCacheClusterResponse x)
-> (forall x.
    Rep CreateCacheClusterResponse x -> CreateCacheClusterResponse)
-> Generic CreateCacheClusterResponse
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' :: Maybe CacheCluster -> Int -> CreateCacheClusterResponse
CreateCacheClusterResponse'
    { $sel:cacheCluster:CreateCacheClusterResponse' :: Maybe CacheCluster
cacheCluster =
        Maybe 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 :: (Maybe CacheCluster -> f (Maybe CacheCluster))
-> CreateCacheClusterResponse -> f CreateCacheClusterResponse
createCacheClusterResponse_cacheCluster = (CreateCacheClusterResponse -> Maybe CacheCluster)
-> (CreateCacheClusterResponse
    -> Maybe CacheCluster -> CreateCacheClusterResponse)
-> Lens
     CreateCacheClusterResponse
     CreateCacheClusterResponse
     (Maybe CacheCluster)
     (Maybe 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 :: (Int -> f Int)
-> CreateCacheClusterResponse -> f CreateCacheClusterResponse
createCacheClusterResponse_httpStatus = (CreateCacheClusterResponse -> Int)
-> (CreateCacheClusterResponse
    -> Int -> CreateCacheClusterResponse)
-> Lens
     CreateCacheClusterResponse CreateCacheClusterResponse Int Int
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