{-# 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.ModifyReplicationGroup
-- 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)
--
-- Modifies the settings for a replication group.
--
-- -   <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/scaling-redis-cluster-mode-enabled.html Scaling for Amazon ElastiCache for Redis (cluster mode enabled)>
--     in the ElastiCache User Guide
--
-- -   <https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_ModifyReplicationGroupShardConfiguration.html ModifyReplicationGroupShardConfiguration>
--     in the ElastiCache API Reference
--
-- This operation is valid for Redis only.
module Amazonka.ElastiCache.ModifyReplicationGroup
  ( -- * Creating a Request
    ModifyReplicationGroup (..),
    newModifyReplicationGroup,

    -- * Request Lenses
    modifyReplicationGroup_automaticFailoverEnabled,
    modifyReplicationGroup_engineVersion,
    modifyReplicationGroup_cacheNodeType,
    modifyReplicationGroup_snapshottingClusterId,
    modifyReplicationGroup_securityGroupIds,
    modifyReplicationGroup_autoMinorVersionUpgrade,
    modifyReplicationGroup_cacheParameterGroupName,
    modifyReplicationGroup_replicationGroupDescription,
    modifyReplicationGroup_snapshotWindow,
    modifyReplicationGroup_logDeliveryConfigurations,
    modifyReplicationGroup_authToken,
    modifyReplicationGroup_primaryClusterId,
    modifyReplicationGroup_preferredMaintenanceWindow,
    modifyReplicationGroup_multiAZEnabled,
    modifyReplicationGroup_userGroupIdsToAdd,
    modifyReplicationGroup_nodeGroupId,
    modifyReplicationGroup_snapshotRetentionLimit,
    modifyReplicationGroup_userGroupIdsToRemove,
    modifyReplicationGroup_notificationTopicStatus,
    modifyReplicationGroup_applyImmediately,
    modifyReplicationGroup_removeUserGroups,
    modifyReplicationGroup_authTokenUpdateStrategy,
    modifyReplicationGroup_notificationTopicArn,
    modifyReplicationGroup_cacheSecurityGroupNames,
    modifyReplicationGroup_replicationGroupId,

    -- * Destructuring the Response
    ModifyReplicationGroupResponse (..),
    newModifyReplicationGroupResponse,

    -- * Response Lenses
    modifyReplicationGroupResponse_replicationGroup,
    modifyReplicationGroupResponse_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 @ModifyReplicationGroups@ operation.
--
-- /See:/ 'newModifyReplicationGroup' smart constructor.
data ModifyReplicationGroup = ModifyReplicationGroup'
  { -- | Determines whether a read replica is automatically promoted to
    -- read\/write primary if the existing primary encounters a failure.
    --
    -- Valid values: @true@ | @false@
    ModifyReplicationGroup -> Maybe Bool
automaticFailoverEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The upgraded version of the cache engine to be run on the clusters in
    -- the replication group.
    --
    -- __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 replication
    -- group and create it anew with the earlier engine version.
    ModifyReplicationGroup -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
    -- | A valid cache node type that you want to scale this replication group
    -- to.
    ModifyReplicationGroup -> Maybe Text
cacheNodeType :: Prelude.Maybe Prelude.Text,
    -- | The cluster ID that is used as the daily snapshot source for the
    -- replication group. This parameter cannot be set for Redis (cluster mode
    -- enabled) replication groups.
    ModifyReplicationGroup -> Maybe Text
snapshottingClusterId :: Prelude.Maybe Prelude.Text,
    -- | Specifies the VPC Security Groups associated with the clusters in the
    -- replication group.
    --
    -- This parameter can be used only with replication group containing
    -- clusters running in an Amazon Virtual Private Cloud (Amazon VPC).
    ModifyReplicationGroup -> Maybe [Text]
securityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | This parameter is currently disabled.
    ModifyReplicationGroup -> Maybe Bool
autoMinorVersionUpgrade :: Prelude.Maybe Prelude.Bool,
    -- | The name of the cache parameter group to apply to all of the clusters in
    -- this replication group. This change is asynchronously applied as soon as
    -- possible for parameters when the @ApplyImmediately@ parameter is
    -- specified as @true@ for this request.
    ModifyReplicationGroup -> Maybe Text
cacheParameterGroupName :: Prelude.Maybe Prelude.Text,
    -- | A description for the replication group. Maximum length is 255
    -- characters.
    ModifyReplicationGroup -> Maybe Text
replicationGroupDescription :: Prelude.Maybe Prelude.Text,
    -- | The daily time range (in UTC) during which ElastiCache begins taking a
    -- daily snapshot of the node group (shard) specified by
    -- @SnapshottingClusterId@.
    --
    -- Example: @05:00-09:00@
    --
    -- If you do not specify this parameter, ElastiCache automatically chooses
    -- an appropriate time range.
    ModifyReplicationGroup -> Maybe Text
snapshotWindow :: Prelude.Maybe Prelude.Text,
    -- | Specifies the destination, format and type of the logs.
    ModifyReplicationGroup -> Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations :: Prelude.Maybe [LogDeliveryConfigurationRequest],
    -- | Reserved parameter. The password used to access a password protected
    -- server. This parameter must be specified with the
    -- @auth-token-update-strategy @ parameter. Password constraints:
    --
    -- -   Must be only printable ASCII characters
    --
    -- -   Must be at least 16 characters and no more than 128 characters in
    --     length
    --
    -- -   Cannot contain any of the following characters: \'\/\', \'\"\', or
    --     \'\@\', \'%\'
    --
    -- For more information, see AUTH password at
    -- <http://redis.io/commands/AUTH AUTH>.
    ModifyReplicationGroup -> Maybe Text
authToken :: Prelude.Maybe Prelude.Text,
    -- | For replication groups with a single primary, if this parameter is
    -- specified, ElastiCache promotes the specified cluster in the specified
    -- replication group to the primary role. The nodes of all other clusters
    -- in the replication group are read replicas.
    ModifyReplicationGroup -> Maybe Text
primaryClusterId :: 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:
    --
    -- -   @sun@
    --
    -- -   @mon@
    --
    -- -   @tue@
    --
    -- -   @wed@
    --
    -- -   @thu@
    --
    -- -   @fri@
    --
    -- -   @sat@
    --
    -- Example: @sun:23:00-mon:01:30@
    ModifyReplicationGroup -> Maybe Text
preferredMaintenanceWindow :: Prelude.Maybe Prelude.Text,
    -- | A flag to indicate MultiAZ is enabled.
    ModifyReplicationGroup -> Maybe Bool
multiAZEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The ID of the user group you are associating with the replication group.
    ModifyReplicationGroup -> Maybe [Text]
userGroupIdsToAdd :: Prelude.Maybe [Prelude.Text],
    -- | Deprecated. This parameter is not used.
    ModifyReplicationGroup -> Maybe Text
nodeGroupId :: Prelude.Maybe Prelude.Text,
    -- | The number of days for which ElastiCache retains automatic node group
    -- (shard) snapshots before deleting them. For example, if you set
    -- @SnapshotRetentionLimit@ to 5, a snapshot that was taken today is
    -- retained for 5 days before being deleted.
    --
    -- __Important__ If the value of SnapshotRetentionLimit is set to zero (0),
    -- backups are turned off.
    ModifyReplicationGroup -> Maybe Int
snapshotRetentionLimit :: Prelude.Maybe Prelude.Int,
    -- | The ID of the user group to disassociate from the replication group,
    -- meaning the users in the group no longer can access the replication
    -- group.
    ModifyReplicationGroup -> Maybe [Text]
userGroupIdsToRemove :: Prelude.Maybe [Prelude.Text],
    -- | The status of the Amazon SNS notification topic for the replication
    -- group. Notifications are sent only if the status is @active@.
    --
    -- Valid values: @active@ | @inactive@
    ModifyReplicationGroup -> Maybe Text
notificationTopicStatus :: Prelude.Maybe Prelude.Text,
    -- | If @true@, this parameter causes the modifications in this request and
    -- any pending modifications to be applied, asynchronously and as soon as
    -- possible, regardless of the @PreferredMaintenanceWindow@ setting for the
    -- replication group.
    --
    -- If @false@, changes to the nodes in the replication group are applied on
    -- the next maintenance reboot, or the next failure reboot, whichever
    -- occurs first.
    --
    -- Valid values: @true@ | @false@
    --
    -- Default: @false@
    ModifyReplicationGroup -> Maybe Bool
applyImmediately :: Prelude.Maybe Prelude.Bool,
    -- | Removes the user group associated with this replication group.
    ModifyReplicationGroup -> Maybe Bool
removeUserGroups :: Prelude.Maybe Prelude.Bool,
    -- | Specifies the strategy to use to update the AUTH token. This parameter
    -- must be specified with the @auth-token@ parameter. Possible values:
    --
    -- -   Rotate
    --
    -- -   Set
    --
    -- For more information, see
    -- <http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/auth.html Authenticating Users with Redis AUTH>
    ModifyReplicationGroup -> Maybe AuthTokenUpdateStrategyType
authTokenUpdateStrategy :: Prelude.Maybe AuthTokenUpdateStrategyType,
    -- | The Amazon Resource Name (ARN) of the Amazon SNS topic to which
    -- notifications are sent.
    --
    -- The Amazon SNS topic owner must be same as the replication group owner.
    ModifyReplicationGroup -> Maybe Text
notificationTopicArn :: Prelude.Maybe Prelude.Text,
    -- | A list of cache security group names to authorize for the clusters in
    -- this replication group. This change is asynchronously applied as soon as
    -- possible.
    --
    -- This parameter can be used only with replication group containing
    -- clusters running outside of an Amazon Virtual Private Cloud (Amazon
    -- VPC).
    --
    -- Constraints: Must contain no more than 255 alphanumeric characters. Must
    -- not be @Default@.
    ModifyReplicationGroup -> Maybe [Text]
cacheSecurityGroupNames :: Prelude.Maybe [Prelude.Text],
    -- | The identifier of the replication group to modify.
    ModifyReplicationGroup -> Text
replicationGroupId :: Prelude.Text
  }
  deriving (ModifyReplicationGroup -> ModifyReplicationGroup -> Bool
(ModifyReplicationGroup -> ModifyReplicationGroup -> Bool)
-> (ModifyReplicationGroup -> ModifyReplicationGroup -> Bool)
-> Eq ModifyReplicationGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyReplicationGroup -> ModifyReplicationGroup -> Bool
$c/= :: ModifyReplicationGroup -> ModifyReplicationGroup -> Bool
== :: ModifyReplicationGroup -> ModifyReplicationGroup -> Bool
$c== :: ModifyReplicationGroup -> ModifyReplicationGroup -> Bool
Prelude.Eq, ReadPrec [ModifyReplicationGroup]
ReadPrec ModifyReplicationGroup
Int -> ReadS ModifyReplicationGroup
ReadS [ModifyReplicationGroup]
(Int -> ReadS ModifyReplicationGroup)
-> ReadS [ModifyReplicationGroup]
-> ReadPrec ModifyReplicationGroup
-> ReadPrec [ModifyReplicationGroup]
-> Read ModifyReplicationGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyReplicationGroup]
$creadListPrec :: ReadPrec [ModifyReplicationGroup]
readPrec :: ReadPrec ModifyReplicationGroup
$creadPrec :: ReadPrec ModifyReplicationGroup
readList :: ReadS [ModifyReplicationGroup]
$creadList :: ReadS [ModifyReplicationGroup]
readsPrec :: Int -> ReadS ModifyReplicationGroup
$creadsPrec :: Int -> ReadS ModifyReplicationGroup
Prelude.Read, Int -> ModifyReplicationGroup -> ShowS
[ModifyReplicationGroup] -> ShowS
ModifyReplicationGroup -> String
(Int -> ModifyReplicationGroup -> ShowS)
-> (ModifyReplicationGroup -> String)
-> ([ModifyReplicationGroup] -> ShowS)
-> Show ModifyReplicationGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyReplicationGroup] -> ShowS
$cshowList :: [ModifyReplicationGroup] -> ShowS
show :: ModifyReplicationGroup -> String
$cshow :: ModifyReplicationGroup -> String
showsPrec :: Int -> ModifyReplicationGroup -> ShowS
$cshowsPrec :: Int -> ModifyReplicationGroup -> ShowS
Prelude.Show, (forall x. ModifyReplicationGroup -> Rep ModifyReplicationGroup x)
-> (forall x.
    Rep ModifyReplicationGroup x -> ModifyReplicationGroup)
-> Generic ModifyReplicationGroup
forall x. Rep ModifyReplicationGroup x -> ModifyReplicationGroup
forall x. ModifyReplicationGroup -> Rep ModifyReplicationGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModifyReplicationGroup x -> ModifyReplicationGroup
$cfrom :: forall x. ModifyReplicationGroup -> Rep ModifyReplicationGroup x
Prelude.Generic)

-- |
-- Create a value of 'ModifyReplicationGroup' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'automaticFailoverEnabled', 'modifyReplicationGroup_automaticFailoverEnabled' - Determines whether a read replica is automatically promoted to
-- read\/write primary if the existing primary encounters a failure.
--
-- Valid values: @true@ | @false@
--
-- 'engineVersion', 'modifyReplicationGroup_engineVersion' - The upgraded version of the cache engine to be run on the clusters in
-- the replication group.
--
-- __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 replication
-- group and create it anew with the earlier engine version.
--
-- 'cacheNodeType', 'modifyReplicationGroup_cacheNodeType' - A valid cache node type that you want to scale this replication group
-- to.
--
-- 'snapshottingClusterId', 'modifyReplicationGroup_snapshottingClusterId' - The cluster ID that is used as the daily snapshot source for the
-- replication group. This parameter cannot be set for Redis (cluster mode
-- enabled) replication groups.
--
-- 'securityGroupIds', 'modifyReplicationGroup_securityGroupIds' - Specifies the VPC Security Groups associated with the clusters in the
-- replication group.
--
-- This parameter can be used only with replication group containing
-- clusters running in an Amazon Virtual Private Cloud (Amazon VPC).
--
-- 'autoMinorVersionUpgrade', 'modifyReplicationGroup_autoMinorVersionUpgrade' - This parameter is currently disabled.
--
-- 'cacheParameterGroupName', 'modifyReplicationGroup_cacheParameterGroupName' - The name of the cache parameter group to apply to all of the clusters in
-- this replication group. This change is asynchronously applied as soon as
-- possible for parameters when the @ApplyImmediately@ parameter is
-- specified as @true@ for this request.
--
-- 'replicationGroupDescription', 'modifyReplicationGroup_replicationGroupDescription' - A description for the replication group. Maximum length is 255
-- characters.
--
-- 'snapshotWindow', 'modifyReplicationGroup_snapshotWindow' - The daily time range (in UTC) during which ElastiCache begins taking a
-- daily snapshot of the node group (shard) specified by
-- @SnapshottingClusterId@.
--
-- Example: @05:00-09:00@
--
-- If you do not specify this parameter, ElastiCache automatically chooses
-- an appropriate time range.
--
-- 'logDeliveryConfigurations', 'modifyReplicationGroup_logDeliveryConfigurations' - Specifies the destination, format and type of the logs.
--
-- 'authToken', 'modifyReplicationGroup_authToken' - Reserved parameter. The password used to access a password protected
-- server. This parameter must be specified with the
-- @auth-token-update-strategy @ parameter. Password constraints:
--
-- -   Must be only printable ASCII characters
--
-- -   Must be at least 16 characters and no more than 128 characters in
--     length
--
-- -   Cannot contain any of the following characters: \'\/\', \'\"\', or
--     \'\@\', \'%\'
--
-- For more information, see AUTH password at
-- <http://redis.io/commands/AUTH AUTH>.
--
-- 'primaryClusterId', 'modifyReplicationGroup_primaryClusterId' - For replication groups with a single primary, if this parameter is
-- specified, ElastiCache promotes the specified cluster in the specified
-- replication group to the primary role. The nodes of all other clusters
-- in the replication group are read replicas.
--
-- 'preferredMaintenanceWindow', 'modifyReplicationGroup_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:
--
-- -   @sun@
--
-- -   @mon@
--
-- -   @tue@
--
-- -   @wed@
--
-- -   @thu@
--
-- -   @fri@
--
-- -   @sat@
--
-- Example: @sun:23:00-mon:01:30@
--
-- 'multiAZEnabled', 'modifyReplicationGroup_multiAZEnabled' - A flag to indicate MultiAZ is enabled.
--
-- 'userGroupIdsToAdd', 'modifyReplicationGroup_userGroupIdsToAdd' - The ID of the user group you are associating with the replication group.
--
-- 'nodeGroupId', 'modifyReplicationGroup_nodeGroupId' - Deprecated. This parameter is not used.
--
-- 'snapshotRetentionLimit', 'modifyReplicationGroup_snapshotRetentionLimit' - The number of days for which ElastiCache retains automatic node group
-- (shard) snapshots before deleting them. For example, if you set
-- @SnapshotRetentionLimit@ to 5, a snapshot that was taken today is
-- retained for 5 days before being deleted.
--
-- __Important__ If the value of SnapshotRetentionLimit is set to zero (0),
-- backups are turned off.
--
-- 'userGroupIdsToRemove', 'modifyReplicationGroup_userGroupIdsToRemove' - The ID of the user group to disassociate from the replication group,
-- meaning the users in the group no longer can access the replication
-- group.
--
-- 'notificationTopicStatus', 'modifyReplicationGroup_notificationTopicStatus' - The status of the Amazon SNS notification topic for the replication
-- group. Notifications are sent only if the status is @active@.
--
-- Valid values: @active@ | @inactive@
--
-- 'applyImmediately', 'modifyReplicationGroup_applyImmediately' - If @true@, this parameter causes the modifications in this request and
-- any pending modifications to be applied, asynchronously and as soon as
-- possible, regardless of the @PreferredMaintenanceWindow@ setting for the
-- replication group.
--
-- If @false@, changes to the nodes in the replication group are applied on
-- the next maintenance reboot, or the next failure reboot, whichever
-- occurs first.
--
-- Valid values: @true@ | @false@
--
-- Default: @false@
--
-- 'removeUserGroups', 'modifyReplicationGroup_removeUserGroups' - Removes the user group associated with this replication group.
--
-- 'authTokenUpdateStrategy', 'modifyReplicationGroup_authTokenUpdateStrategy' - Specifies the strategy to use to update the AUTH token. This parameter
-- must be specified with the @auth-token@ parameter. Possible values:
--
-- -   Rotate
--
-- -   Set
--
-- For more information, see
-- <http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/auth.html Authenticating Users with Redis AUTH>
--
-- 'notificationTopicArn', 'modifyReplicationGroup_notificationTopicArn' - The Amazon Resource Name (ARN) of the Amazon SNS topic to which
-- notifications are sent.
--
-- The Amazon SNS topic owner must be same as the replication group owner.
--
-- 'cacheSecurityGroupNames', 'modifyReplicationGroup_cacheSecurityGroupNames' - A list of cache security group names to authorize for the clusters in
-- this replication group. This change is asynchronously applied as soon as
-- possible.
--
-- This parameter can be used only with replication group containing
-- clusters running outside of an Amazon Virtual Private Cloud (Amazon
-- VPC).
--
-- Constraints: Must contain no more than 255 alphanumeric characters. Must
-- not be @Default@.
--
-- 'replicationGroupId', 'modifyReplicationGroup_replicationGroupId' - The identifier of the replication group to modify.
newModifyReplicationGroup ::
  -- | 'replicationGroupId'
  Prelude.Text ->
  ModifyReplicationGroup
newModifyReplicationGroup :: Text -> ModifyReplicationGroup
newModifyReplicationGroup Text
pReplicationGroupId_ =
  ModifyReplicationGroup' :: Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [LogDeliveryConfigurationRequest]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe Int
-> Maybe [Text]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe AuthTokenUpdateStrategyType
-> Maybe Text
-> Maybe [Text]
-> Text
-> ModifyReplicationGroup
ModifyReplicationGroup'
    { $sel:automaticFailoverEnabled:ModifyReplicationGroup' :: Maybe Bool
automaticFailoverEnabled =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:engineVersion:ModifyReplicationGroup' :: Maybe Text
engineVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheNodeType:ModifyReplicationGroup' :: Maybe Text
cacheNodeType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshottingClusterId:ModifyReplicationGroup' :: Maybe Text
snapshottingClusterId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:securityGroupIds:ModifyReplicationGroup' :: Maybe [Text]
securityGroupIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:autoMinorVersionUpgrade:ModifyReplicationGroup' :: Maybe Bool
autoMinorVersionUpgrade = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheParameterGroupName:ModifyReplicationGroup' :: Maybe Text
cacheParameterGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationGroupDescription:ModifyReplicationGroup' :: Maybe Text
replicationGroupDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotWindow:ModifyReplicationGroup' :: Maybe Text
snapshotWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:logDeliveryConfigurations:ModifyReplicationGroup' :: Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations = Maybe [LogDeliveryConfigurationRequest]
forall a. Maybe a
Prelude.Nothing,
      $sel:authToken:ModifyReplicationGroup' :: Maybe Text
authToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:primaryClusterId:ModifyReplicationGroup' :: Maybe Text
primaryClusterId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:preferredMaintenanceWindow:ModifyReplicationGroup' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:multiAZEnabled:ModifyReplicationGroup' :: Maybe Bool
multiAZEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:userGroupIdsToAdd:ModifyReplicationGroup' :: Maybe [Text]
userGroupIdsToAdd = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:nodeGroupId:ModifyReplicationGroup' :: Maybe Text
nodeGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotRetentionLimit:ModifyReplicationGroup' :: Maybe Int
snapshotRetentionLimit = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:userGroupIdsToRemove:ModifyReplicationGroup' :: Maybe [Text]
userGroupIdsToRemove = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:notificationTopicStatus:ModifyReplicationGroup' :: Maybe Text
notificationTopicStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:applyImmediately:ModifyReplicationGroup' :: Maybe Bool
applyImmediately = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:removeUserGroups:ModifyReplicationGroup' :: Maybe Bool
removeUserGroups = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:authTokenUpdateStrategy:ModifyReplicationGroup' :: Maybe AuthTokenUpdateStrategyType
authTokenUpdateStrategy = Maybe AuthTokenUpdateStrategyType
forall a. Maybe a
Prelude.Nothing,
      $sel:notificationTopicArn:ModifyReplicationGroup' :: Maybe Text
notificationTopicArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheSecurityGroupNames:ModifyReplicationGroup' :: Maybe [Text]
cacheSecurityGroupNames = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationGroupId:ModifyReplicationGroup' :: Text
replicationGroupId = Text
pReplicationGroupId_
    }

-- | Determines whether a read replica is automatically promoted to
-- read\/write primary if the existing primary encounters a failure.
--
-- Valid values: @true@ | @false@
modifyReplicationGroup_automaticFailoverEnabled :: Lens.Lens' ModifyReplicationGroup (Prelude.Maybe Prelude.Bool)
modifyReplicationGroup_automaticFailoverEnabled :: (Maybe Bool -> f (Maybe Bool))
-> ModifyReplicationGroup -> f ModifyReplicationGroup
modifyReplicationGroup_automaticFailoverEnabled = (ModifyReplicationGroup -> Maybe Bool)
-> (ModifyReplicationGroup -> Maybe Bool -> ModifyReplicationGroup)
-> Lens
     ModifyReplicationGroup
     ModifyReplicationGroup
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroup' {Maybe Bool
automaticFailoverEnabled :: Maybe Bool
$sel:automaticFailoverEnabled:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Bool
automaticFailoverEnabled} -> Maybe Bool
automaticFailoverEnabled) (\s :: ModifyReplicationGroup
s@ModifyReplicationGroup' {} Maybe Bool
a -> ModifyReplicationGroup
s {$sel:automaticFailoverEnabled:ModifyReplicationGroup' :: Maybe Bool
automaticFailoverEnabled = Maybe Bool
a} :: ModifyReplicationGroup)

-- | The upgraded version of the cache engine to be run on the clusters in
-- the replication group.
--
-- __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 replication
-- group and create it anew with the earlier engine version.
modifyReplicationGroup_engineVersion :: Lens.Lens' ModifyReplicationGroup (Prelude.Maybe Prelude.Text)
modifyReplicationGroup_engineVersion :: (Maybe Text -> f (Maybe Text))
-> ModifyReplicationGroup -> f ModifyReplicationGroup
modifyReplicationGroup_engineVersion = (ModifyReplicationGroup -> Maybe Text)
-> (ModifyReplicationGroup -> Maybe Text -> ModifyReplicationGroup)
-> Lens
     ModifyReplicationGroup
     ModifyReplicationGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroup' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: ModifyReplicationGroup
s@ModifyReplicationGroup' {} Maybe Text
a -> ModifyReplicationGroup
s {$sel:engineVersion:ModifyReplicationGroup' :: Maybe Text
engineVersion = Maybe Text
a} :: ModifyReplicationGroup)

-- | A valid cache node type that you want to scale this replication group
-- to.
modifyReplicationGroup_cacheNodeType :: Lens.Lens' ModifyReplicationGroup (Prelude.Maybe Prelude.Text)
modifyReplicationGroup_cacheNodeType :: (Maybe Text -> f (Maybe Text))
-> ModifyReplicationGroup -> f ModifyReplicationGroup
modifyReplicationGroup_cacheNodeType = (ModifyReplicationGroup -> Maybe Text)
-> (ModifyReplicationGroup -> Maybe Text -> ModifyReplicationGroup)
-> Lens
     ModifyReplicationGroup
     ModifyReplicationGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroup' {Maybe Text
cacheNodeType :: Maybe Text
$sel:cacheNodeType:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Text
cacheNodeType} -> Maybe Text
cacheNodeType) (\s :: ModifyReplicationGroup
s@ModifyReplicationGroup' {} Maybe Text
a -> ModifyReplicationGroup
s {$sel:cacheNodeType:ModifyReplicationGroup' :: Maybe Text
cacheNodeType = Maybe Text
a} :: ModifyReplicationGroup)

-- | The cluster ID that is used as the daily snapshot source for the
-- replication group. This parameter cannot be set for Redis (cluster mode
-- enabled) replication groups.
modifyReplicationGroup_snapshottingClusterId :: Lens.Lens' ModifyReplicationGroup (Prelude.Maybe Prelude.Text)
modifyReplicationGroup_snapshottingClusterId :: (Maybe Text -> f (Maybe Text))
-> ModifyReplicationGroup -> f ModifyReplicationGroup
modifyReplicationGroup_snapshottingClusterId = (ModifyReplicationGroup -> Maybe Text)
-> (ModifyReplicationGroup -> Maybe Text -> ModifyReplicationGroup)
-> Lens
     ModifyReplicationGroup
     ModifyReplicationGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroup' {Maybe Text
snapshottingClusterId :: Maybe Text
$sel:snapshottingClusterId:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Text
snapshottingClusterId} -> Maybe Text
snapshottingClusterId) (\s :: ModifyReplicationGroup
s@ModifyReplicationGroup' {} Maybe Text
a -> ModifyReplicationGroup
s {$sel:snapshottingClusterId:ModifyReplicationGroup' :: Maybe Text
snapshottingClusterId = Maybe Text
a} :: ModifyReplicationGroup)

-- | Specifies the VPC Security Groups associated with the clusters in the
-- replication group.
--
-- This parameter can be used only with replication group containing
-- clusters running in an Amazon Virtual Private Cloud (Amazon VPC).
modifyReplicationGroup_securityGroupIds :: Lens.Lens' ModifyReplicationGroup (Prelude.Maybe [Prelude.Text])
modifyReplicationGroup_securityGroupIds :: (Maybe [Text] -> f (Maybe [Text]))
-> ModifyReplicationGroup -> f ModifyReplicationGroup
modifyReplicationGroup_securityGroupIds = (ModifyReplicationGroup -> Maybe [Text])
-> (ModifyReplicationGroup
    -> Maybe [Text] -> ModifyReplicationGroup)
-> Lens
     ModifyReplicationGroup
     ModifyReplicationGroup
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroup' {Maybe [Text]
securityGroupIds :: Maybe [Text]
$sel:securityGroupIds:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe [Text]
securityGroupIds} -> Maybe [Text]
securityGroupIds) (\s :: ModifyReplicationGroup
s@ModifyReplicationGroup' {} Maybe [Text]
a -> ModifyReplicationGroup
s {$sel:securityGroupIds:ModifyReplicationGroup' :: Maybe [Text]
securityGroupIds = Maybe [Text]
a} :: ModifyReplicationGroup) ((Maybe [Text] -> f (Maybe [Text]))
 -> ModifyReplicationGroup -> f ModifyReplicationGroup)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ModifyReplicationGroup
-> f ModifyReplicationGroup
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.
modifyReplicationGroup_autoMinorVersionUpgrade :: Lens.Lens' ModifyReplicationGroup (Prelude.Maybe Prelude.Bool)
modifyReplicationGroup_autoMinorVersionUpgrade :: (Maybe Bool -> f (Maybe Bool))
-> ModifyReplicationGroup -> f ModifyReplicationGroup
modifyReplicationGroup_autoMinorVersionUpgrade = (ModifyReplicationGroup -> Maybe Bool)
-> (ModifyReplicationGroup -> Maybe Bool -> ModifyReplicationGroup)
-> Lens
     ModifyReplicationGroup
     ModifyReplicationGroup
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroup' {Maybe Bool
autoMinorVersionUpgrade :: Maybe Bool
$sel:autoMinorVersionUpgrade:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Bool
autoMinorVersionUpgrade} -> Maybe Bool
autoMinorVersionUpgrade) (\s :: ModifyReplicationGroup
s@ModifyReplicationGroup' {} Maybe Bool
a -> ModifyReplicationGroup
s {$sel:autoMinorVersionUpgrade:ModifyReplicationGroup' :: Maybe Bool
autoMinorVersionUpgrade = Maybe Bool
a} :: ModifyReplicationGroup)

-- | The name of the cache parameter group to apply to all of the clusters in
-- this replication group. This change is asynchronously applied as soon as
-- possible for parameters when the @ApplyImmediately@ parameter is
-- specified as @true@ for this request.
modifyReplicationGroup_cacheParameterGroupName :: Lens.Lens' ModifyReplicationGroup (Prelude.Maybe Prelude.Text)
modifyReplicationGroup_cacheParameterGroupName :: (Maybe Text -> f (Maybe Text))
-> ModifyReplicationGroup -> f ModifyReplicationGroup
modifyReplicationGroup_cacheParameterGroupName = (ModifyReplicationGroup -> Maybe Text)
-> (ModifyReplicationGroup -> Maybe Text -> ModifyReplicationGroup)
-> Lens
     ModifyReplicationGroup
     ModifyReplicationGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroup' {Maybe Text
cacheParameterGroupName :: Maybe Text
$sel:cacheParameterGroupName:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Text
cacheParameterGroupName} -> Maybe Text
cacheParameterGroupName) (\s :: ModifyReplicationGroup
s@ModifyReplicationGroup' {} Maybe Text
a -> ModifyReplicationGroup
s {$sel:cacheParameterGroupName:ModifyReplicationGroup' :: Maybe Text
cacheParameterGroupName = Maybe Text
a} :: ModifyReplicationGroup)

-- | A description for the replication group. Maximum length is 255
-- characters.
modifyReplicationGroup_replicationGroupDescription :: Lens.Lens' ModifyReplicationGroup (Prelude.Maybe Prelude.Text)
modifyReplicationGroup_replicationGroupDescription :: (Maybe Text -> f (Maybe Text))
-> ModifyReplicationGroup -> f ModifyReplicationGroup
modifyReplicationGroup_replicationGroupDescription = (ModifyReplicationGroup -> Maybe Text)
-> (ModifyReplicationGroup -> Maybe Text -> ModifyReplicationGroup)
-> Lens
     ModifyReplicationGroup
     ModifyReplicationGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroup' {Maybe Text
replicationGroupDescription :: Maybe Text
$sel:replicationGroupDescription:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Text
replicationGroupDescription} -> Maybe Text
replicationGroupDescription) (\s :: ModifyReplicationGroup
s@ModifyReplicationGroup' {} Maybe Text
a -> ModifyReplicationGroup
s {$sel:replicationGroupDescription:ModifyReplicationGroup' :: Maybe Text
replicationGroupDescription = Maybe Text
a} :: ModifyReplicationGroup)

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

-- | Specifies the destination, format and type of the logs.
modifyReplicationGroup_logDeliveryConfigurations :: Lens.Lens' ModifyReplicationGroup (Prelude.Maybe [LogDeliveryConfigurationRequest])
modifyReplicationGroup_logDeliveryConfigurations :: (Maybe [LogDeliveryConfigurationRequest]
 -> f (Maybe [LogDeliveryConfigurationRequest]))
-> ModifyReplicationGroup -> f ModifyReplicationGroup
modifyReplicationGroup_logDeliveryConfigurations = (ModifyReplicationGroup -> Maybe [LogDeliveryConfigurationRequest])
-> (ModifyReplicationGroup
    -> Maybe [LogDeliveryConfigurationRequest]
    -> ModifyReplicationGroup)
-> Lens
     ModifyReplicationGroup
     ModifyReplicationGroup
     (Maybe [LogDeliveryConfigurationRequest])
     (Maybe [LogDeliveryConfigurationRequest])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroup' {Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations :: Maybe [LogDeliveryConfigurationRequest]
$sel:logDeliveryConfigurations:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations} -> Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations) (\s :: ModifyReplicationGroup
s@ModifyReplicationGroup' {} Maybe [LogDeliveryConfigurationRequest]
a -> ModifyReplicationGroup
s {$sel:logDeliveryConfigurations:ModifyReplicationGroup' :: Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations = Maybe [LogDeliveryConfigurationRequest]
a} :: ModifyReplicationGroup) ((Maybe [LogDeliveryConfigurationRequest]
  -> f (Maybe [LogDeliveryConfigurationRequest]))
 -> ModifyReplicationGroup -> f ModifyReplicationGroup)
-> ((Maybe [LogDeliveryConfigurationRequest]
     -> f (Maybe [LogDeliveryConfigurationRequest]))
    -> Maybe [LogDeliveryConfigurationRequest]
    -> f (Maybe [LogDeliveryConfigurationRequest]))
-> (Maybe [LogDeliveryConfigurationRequest]
    -> f (Maybe [LogDeliveryConfigurationRequest]))
-> ModifyReplicationGroup
-> f ModifyReplicationGroup
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. This parameter must be specified with the
-- @auth-token-update-strategy @ parameter. Password constraints:
--
-- -   Must be only printable ASCII characters
--
-- -   Must be at least 16 characters and no more than 128 characters in
--     length
--
-- -   Cannot contain any of the following characters: \'\/\', \'\"\', or
--     \'\@\', \'%\'
--
-- For more information, see AUTH password at
-- <http://redis.io/commands/AUTH AUTH>.
modifyReplicationGroup_authToken :: Lens.Lens' ModifyReplicationGroup (Prelude.Maybe Prelude.Text)
modifyReplicationGroup_authToken :: (Maybe Text -> f (Maybe Text))
-> ModifyReplicationGroup -> f ModifyReplicationGroup
modifyReplicationGroup_authToken = (ModifyReplicationGroup -> Maybe Text)
-> (ModifyReplicationGroup -> Maybe Text -> ModifyReplicationGroup)
-> Lens
     ModifyReplicationGroup
     ModifyReplicationGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroup' {Maybe Text
authToken :: Maybe Text
$sel:authToken:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Text
authToken} -> Maybe Text
authToken) (\s :: ModifyReplicationGroup
s@ModifyReplicationGroup' {} Maybe Text
a -> ModifyReplicationGroup
s {$sel:authToken:ModifyReplicationGroup' :: Maybe Text
authToken = Maybe Text
a} :: ModifyReplicationGroup)

-- | For replication groups with a single primary, if this parameter is
-- specified, ElastiCache promotes the specified cluster in the specified
-- replication group to the primary role. The nodes of all other clusters
-- in the replication group are read replicas.
modifyReplicationGroup_primaryClusterId :: Lens.Lens' ModifyReplicationGroup (Prelude.Maybe Prelude.Text)
modifyReplicationGroup_primaryClusterId :: (Maybe Text -> f (Maybe Text))
-> ModifyReplicationGroup -> f ModifyReplicationGroup
modifyReplicationGroup_primaryClusterId = (ModifyReplicationGroup -> Maybe Text)
-> (ModifyReplicationGroup -> Maybe Text -> ModifyReplicationGroup)
-> Lens
     ModifyReplicationGroup
     ModifyReplicationGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroup' {Maybe Text
primaryClusterId :: Maybe Text
$sel:primaryClusterId:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Text
primaryClusterId} -> Maybe Text
primaryClusterId) (\s :: ModifyReplicationGroup
s@ModifyReplicationGroup' {} Maybe Text
a -> ModifyReplicationGroup
s {$sel:primaryClusterId:ModifyReplicationGroup' :: Maybe Text
primaryClusterId = Maybe Text
a} :: ModifyReplicationGroup)

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

-- | A flag to indicate MultiAZ is enabled.
modifyReplicationGroup_multiAZEnabled :: Lens.Lens' ModifyReplicationGroup (Prelude.Maybe Prelude.Bool)
modifyReplicationGroup_multiAZEnabled :: (Maybe Bool -> f (Maybe Bool))
-> ModifyReplicationGroup -> f ModifyReplicationGroup
modifyReplicationGroup_multiAZEnabled = (ModifyReplicationGroup -> Maybe Bool)
-> (ModifyReplicationGroup -> Maybe Bool -> ModifyReplicationGroup)
-> Lens
     ModifyReplicationGroup
     ModifyReplicationGroup
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroup' {Maybe Bool
multiAZEnabled :: Maybe Bool
$sel:multiAZEnabled:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Bool
multiAZEnabled} -> Maybe Bool
multiAZEnabled) (\s :: ModifyReplicationGroup
s@ModifyReplicationGroup' {} Maybe Bool
a -> ModifyReplicationGroup
s {$sel:multiAZEnabled:ModifyReplicationGroup' :: Maybe Bool
multiAZEnabled = Maybe Bool
a} :: ModifyReplicationGroup)

-- | The ID of the user group you are associating with the replication group.
modifyReplicationGroup_userGroupIdsToAdd :: Lens.Lens' ModifyReplicationGroup (Prelude.Maybe [Prelude.Text])
modifyReplicationGroup_userGroupIdsToAdd :: (Maybe [Text] -> f (Maybe [Text]))
-> ModifyReplicationGroup -> f ModifyReplicationGroup
modifyReplicationGroup_userGroupIdsToAdd = (ModifyReplicationGroup -> Maybe [Text])
-> (ModifyReplicationGroup
    -> Maybe [Text] -> ModifyReplicationGroup)
-> Lens
     ModifyReplicationGroup
     ModifyReplicationGroup
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroup' {Maybe [Text]
userGroupIdsToAdd :: Maybe [Text]
$sel:userGroupIdsToAdd:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe [Text]
userGroupIdsToAdd} -> Maybe [Text]
userGroupIdsToAdd) (\s :: ModifyReplicationGroup
s@ModifyReplicationGroup' {} Maybe [Text]
a -> ModifyReplicationGroup
s {$sel:userGroupIdsToAdd:ModifyReplicationGroup' :: Maybe [Text]
userGroupIdsToAdd = Maybe [Text]
a} :: ModifyReplicationGroup) ((Maybe [Text] -> f (Maybe [Text]))
 -> ModifyReplicationGroup -> f ModifyReplicationGroup)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ModifyReplicationGroup
-> f ModifyReplicationGroup
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

-- | Deprecated. This parameter is not used.
modifyReplicationGroup_nodeGroupId :: Lens.Lens' ModifyReplicationGroup (Prelude.Maybe Prelude.Text)
modifyReplicationGroup_nodeGroupId :: (Maybe Text -> f (Maybe Text))
-> ModifyReplicationGroup -> f ModifyReplicationGroup
modifyReplicationGroup_nodeGroupId = (ModifyReplicationGroup -> Maybe Text)
-> (ModifyReplicationGroup -> Maybe Text -> ModifyReplicationGroup)
-> Lens
     ModifyReplicationGroup
     ModifyReplicationGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroup' {Maybe Text
nodeGroupId :: Maybe Text
$sel:nodeGroupId:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Text
nodeGroupId} -> Maybe Text
nodeGroupId) (\s :: ModifyReplicationGroup
s@ModifyReplicationGroup' {} Maybe Text
a -> ModifyReplicationGroup
s {$sel:nodeGroupId:ModifyReplicationGroup' :: Maybe Text
nodeGroupId = Maybe Text
a} :: ModifyReplicationGroup)

-- | The number of days for which ElastiCache retains automatic node group
-- (shard) snapshots before deleting them. For example, if you set
-- @SnapshotRetentionLimit@ to 5, a snapshot that was taken today is
-- retained for 5 days before being deleted.
--
-- __Important__ If the value of SnapshotRetentionLimit is set to zero (0),
-- backups are turned off.
modifyReplicationGroup_snapshotRetentionLimit :: Lens.Lens' ModifyReplicationGroup (Prelude.Maybe Prelude.Int)
modifyReplicationGroup_snapshotRetentionLimit :: (Maybe Int -> f (Maybe Int))
-> ModifyReplicationGroup -> f ModifyReplicationGroup
modifyReplicationGroup_snapshotRetentionLimit = (ModifyReplicationGroup -> Maybe Int)
-> (ModifyReplicationGroup -> Maybe Int -> ModifyReplicationGroup)
-> Lens
     ModifyReplicationGroup
     ModifyReplicationGroup
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroup' {Maybe Int
snapshotRetentionLimit :: Maybe Int
$sel:snapshotRetentionLimit:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Int
snapshotRetentionLimit} -> Maybe Int
snapshotRetentionLimit) (\s :: ModifyReplicationGroup
s@ModifyReplicationGroup' {} Maybe Int
a -> ModifyReplicationGroup
s {$sel:snapshotRetentionLimit:ModifyReplicationGroup' :: Maybe Int
snapshotRetentionLimit = Maybe Int
a} :: ModifyReplicationGroup)

-- | The ID of the user group to disassociate from the replication group,
-- meaning the users in the group no longer can access the replication
-- group.
modifyReplicationGroup_userGroupIdsToRemove :: Lens.Lens' ModifyReplicationGroup (Prelude.Maybe [Prelude.Text])
modifyReplicationGroup_userGroupIdsToRemove :: (Maybe [Text] -> f (Maybe [Text]))
-> ModifyReplicationGroup -> f ModifyReplicationGroup
modifyReplicationGroup_userGroupIdsToRemove = (ModifyReplicationGroup -> Maybe [Text])
-> (ModifyReplicationGroup
    -> Maybe [Text] -> ModifyReplicationGroup)
-> Lens
     ModifyReplicationGroup
     ModifyReplicationGroup
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroup' {Maybe [Text]
userGroupIdsToRemove :: Maybe [Text]
$sel:userGroupIdsToRemove:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe [Text]
userGroupIdsToRemove} -> Maybe [Text]
userGroupIdsToRemove) (\s :: ModifyReplicationGroup
s@ModifyReplicationGroup' {} Maybe [Text]
a -> ModifyReplicationGroup
s {$sel:userGroupIdsToRemove:ModifyReplicationGroup' :: Maybe [Text]
userGroupIdsToRemove = Maybe [Text]
a} :: ModifyReplicationGroup) ((Maybe [Text] -> f (Maybe [Text]))
 -> ModifyReplicationGroup -> f ModifyReplicationGroup)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ModifyReplicationGroup
-> f ModifyReplicationGroup
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 status of the Amazon SNS notification topic for the replication
-- group. Notifications are sent only if the status is @active@.
--
-- Valid values: @active@ | @inactive@
modifyReplicationGroup_notificationTopicStatus :: Lens.Lens' ModifyReplicationGroup (Prelude.Maybe Prelude.Text)
modifyReplicationGroup_notificationTopicStatus :: (Maybe Text -> f (Maybe Text))
-> ModifyReplicationGroup -> f ModifyReplicationGroup
modifyReplicationGroup_notificationTopicStatus = (ModifyReplicationGroup -> Maybe Text)
-> (ModifyReplicationGroup -> Maybe Text -> ModifyReplicationGroup)
-> Lens
     ModifyReplicationGroup
     ModifyReplicationGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroup' {Maybe Text
notificationTopicStatus :: Maybe Text
$sel:notificationTopicStatus:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Text
notificationTopicStatus} -> Maybe Text
notificationTopicStatus) (\s :: ModifyReplicationGroup
s@ModifyReplicationGroup' {} Maybe Text
a -> ModifyReplicationGroup
s {$sel:notificationTopicStatus:ModifyReplicationGroup' :: Maybe Text
notificationTopicStatus = Maybe Text
a} :: ModifyReplicationGroup)

-- | If @true@, this parameter causes the modifications in this request and
-- any pending modifications to be applied, asynchronously and as soon as
-- possible, regardless of the @PreferredMaintenanceWindow@ setting for the
-- replication group.
--
-- If @false@, changes to the nodes in the replication group are applied on
-- the next maintenance reboot, or the next failure reboot, whichever
-- occurs first.
--
-- Valid values: @true@ | @false@
--
-- Default: @false@
modifyReplicationGroup_applyImmediately :: Lens.Lens' ModifyReplicationGroup (Prelude.Maybe Prelude.Bool)
modifyReplicationGroup_applyImmediately :: (Maybe Bool -> f (Maybe Bool))
-> ModifyReplicationGroup -> f ModifyReplicationGroup
modifyReplicationGroup_applyImmediately = (ModifyReplicationGroup -> Maybe Bool)
-> (ModifyReplicationGroup -> Maybe Bool -> ModifyReplicationGroup)
-> Lens
     ModifyReplicationGroup
     ModifyReplicationGroup
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroup' {Maybe Bool
applyImmediately :: Maybe Bool
$sel:applyImmediately:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Bool
applyImmediately} -> Maybe Bool
applyImmediately) (\s :: ModifyReplicationGroup
s@ModifyReplicationGroup' {} Maybe Bool
a -> ModifyReplicationGroup
s {$sel:applyImmediately:ModifyReplicationGroup' :: Maybe Bool
applyImmediately = Maybe Bool
a} :: ModifyReplicationGroup)

-- | Removes the user group associated with this replication group.
modifyReplicationGroup_removeUserGroups :: Lens.Lens' ModifyReplicationGroup (Prelude.Maybe Prelude.Bool)
modifyReplicationGroup_removeUserGroups :: (Maybe Bool -> f (Maybe Bool))
-> ModifyReplicationGroup -> f ModifyReplicationGroup
modifyReplicationGroup_removeUserGroups = (ModifyReplicationGroup -> Maybe Bool)
-> (ModifyReplicationGroup -> Maybe Bool -> ModifyReplicationGroup)
-> Lens
     ModifyReplicationGroup
     ModifyReplicationGroup
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroup' {Maybe Bool
removeUserGroups :: Maybe Bool
$sel:removeUserGroups:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Bool
removeUserGroups} -> Maybe Bool
removeUserGroups) (\s :: ModifyReplicationGroup
s@ModifyReplicationGroup' {} Maybe Bool
a -> ModifyReplicationGroup
s {$sel:removeUserGroups:ModifyReplicationGroup' :: Maybe Bool
removeUserGroups = Maybe Bool
a} :: ModifyReplicationGroup)

-- | Specifies the strategy to use to update the AUTH token. This parameter
-- must be specified with the @auth-token@ parameter. Possible values:
--
-- -   Rotate
--
-- -   Set
--
-- For more information, see
-- <http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/auth.html Authenticating Users with Redis AUTH>
modifyReplicationGroup_authTokenUpdateStrategy :: Lens.Lens' ModifyReplicationGroup (Prelude.Maybe AuthTokenUpdateStrategyType)
modifyReplicationGroup_authTokenUpdateStrategy :: (Maybe AuthTokenUpdateStrategyType
 -> f (Maybe AuthTokenUpdateStrategyType))
-> ModifyReplicationGroup -> f ModifyReplicationGroup
modifyReplicationGroup_authTokenUpdateStrategy = (ModifyReplicationGroup -> Maybe AuthTokenUpdateStrategyType)
-> (ModifyReplicationGroup
    -> Maybe AuthTokenUpdateStrategyType -> ModifyReplicationGroup)
-> Lens
     ModifyReplicationGroup
     ModifyReplicationGroup
     (Maybe AuthTokenUpdateStrategyType)
     (Maybe AuthTokenUpdateStrategyType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroup' {Maybe AuthTokenUpdateStrategyType
authTokenUpdateStrategy :: Maybe AuthTokenUpdateStrategyType
$sel:authTokenUpdateStrategy:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe AuthTokenUpdateStrategyType
authTokenUpdateStrategy} -> Maybe AuthTokenUpdateStrategyType
authTokenUpdateStrategy) (\s :: ModifyReplicationGroup
s@ModifyReplicationGroup' {} Maybe AuthTokenUpdateStrategyType
a -> ModifyReplicationGroup
s {$sel:authTokenUpdateStrategy:ModifyReplicationGroup' :: Maybe AuthTokenUpdateStrategyType
authTokenUpdateStrategy = Maybe AuthTokenUpdateStrategyType
a} :: ModifyReplicationGroup)

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

-- | A list of cache security group names to authorize for the clusters in
-- this replication group. This change is asynchronously applied as soon as
-- possible.
--
-- This parameter can be used only with replication group containing
-- clusters running outside of an Amazon Virtual Private Cloud (Amazon
-- VPC).
--
-- Constraints: Must contain no more than 255 alphanumeric characters. Must
-- not be @Default@.
modifyReplicationGroup_cacheSecurityGroupNames :: Lens.Lens' ModifyReplicationGroup (Prelude.Maybe [Prelude.Text])
modifyReplicationGroup_cacheSecurityGroupNames :: (Maybe [Text] -> f (Maybe [Text]))
-> ModifyReplicationGroup -> f ModifyReplicationGroup
modifyReplicationGroup_cacheSecurityGroupNames = (ModifyReplicationGroup -> Maybe [Text])
-> (ModifyReplicationGroup
    -> Maybe [Text] -> ModifyReplicationGroup)
-> Lens
     ModifyReplicationGroup
     ModifyReplicationGroup
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroup' {Maybe [Text]
cacheSecurityGroupNames :: Maybe [Text]
$sel:cacheSecurityGroupNames:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe [Text]
cacheSecurityGroupNames} -> Maybe [Text]
cacheSecurityGroupNames) (\s :: ModifyReplicationGroup
s@ModifyReplicationGroup' {} Maybe [Text]
a -> ModifyReplicationGroup
s {$sel:cacheSecurityGroupNames:ModifyReplicationGroup' :: Maybe [Text]
cacheSecurityGroupNames = Maybe [Text]
a} :: ModifyReplicationGroup) ((Maybe [Text] -> f (Maybe [Text]))
 -> ModifyReplicationGroup -> f ModifyReplicationGroup)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ModifyReplicationGroup
-> f ModifyReplicationGroup
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 identifier of the replication group to modify.
modifyReplicationGroup_replicationGroupId :: Lens.Lens' ModifyReplicationGroup Prelude.Text
modifyReplicationGroup_replicationGroupId :: (Text -> f Text)
-> ModifyReplicationGroup -> f ModifyReplicationGroup
modifyReplicationGroup_replicationGroupId = (ModifyReplicationGroup -> Text)
-> (ModifyReplicationGroup -> Text -> ModifyReplicationGroup)
-> Lens ModifyReplicationGroup ModifyReplicationGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroup' {Text
replicationGroupId :: Text
$sel:replicationGroupId:ModifyReplicationGroup' :: ModifyReplicationGroup -> Text
replicationGroupId} -> Text
replicationGroupId) (\s :: ModifyReplicationGroup
s@ModifyReplicationGroup' {} Text
a -> ModifyReplicationGroup
s {$sel:replicationGroupId:ModifyReplicationGroup' :: Text
replicationGroupId = Text
a} :: ModifyReplicationGroup)

instance Core.AWSRequest ModifyReplicationGroup where
  type
    AWSResponse ModifyReplicationGroup =
      ModifyReplicationGroupResponse
  request :: ModifyReplicationGroup -> Request ModifyReplicationGroup
request = Service -> ModifyReplicationGroup -> Request ModifyReplicationGroup
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy ModifyReplicationGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ModifyReplicationGroup)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse ModifyReplicationGroup))
-> Logger
-> Service
-> Proxy ModifyReplicationGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ModifyReplicationGroup)))
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
"ModifyReplicationGroupResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe ReplicationGroup -> Int -> ModifyReplicationGroupResponse
ModifyReplicationGroupResponse'
            (Maybe ReplicationGroup -> Int -> ModifyReplicationGroupResponse)
-> Either String (Maybe ReplicationGroup)
-> Either String (Int -> ModifyReplicationGroupResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe ReplicationGroup)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ReplicationGroup")
            Either String (Int -> ModifyReplicationGroupResponse)
-> Either String Int
-> Either String ModifyReplicationGroupResponse
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 ModifyReplicationGroup

instance Prelude.NFData ModifyReplicationGroup

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

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

instance Core.ToQuery ModifyReplicationGroup where
  toQuery :: ModifyReplicationGroup -> QueryString
toQuery ModifyReplicationGroup' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [LogDeliveryConfigurationRequest]
Maybe Text
Maybe AuthTokenUpdateStrategyType
Text
replicationGroupId :: Text
cacheSecurityGroupNames :: Maybe [Text]
notificationTopicArn :: Maybe Text
authTokenUpdateStrategy :: Maybe AuthTokenUpdateStrategyType
removeUserGroups :: Maybe Bool
applyImmediately :: Maybe Bool
notificationTopicStatus :: Maybe Text
userGroupIdsToRemove :: Maybe [Text]
snapshotRetentionLimit :: Maybe Int
nodeGroupId :: Maybe Text
userGroupIdsToAdd :: Maybe [Text]
multiAZEnabled :: Maybe Bool
preferredMaintenanceWindow :: Maybe Text
primaryClusterId :: Maybe Text
authToken :: Maybe Text
logDeliveryConfigurations :: Maybe [LogDeliveryConfigurationRequest]
snapshotWindow :: Maybe Text
replicationGroupDescription :: Maybe Text
cacheParameterGroupName :: Maybe Text
autoMinorVersionUpgrade :: Maybe Bool
securityGroupIds :: Maybe [Text]
snapshottingClusterId :: Maybe Text
cacheNodeType :: Maybe Text
engineVersion :: Maybe Text
automaticFailoverEnabled :: Maybe Bool
$sel:replicationGroupId:ModifyReplicationGroup' :: ModifyReplicationGroup -> Text
$sel:cacheSecurityGroupNames:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe [Text]
$sel:notificationTopicArn:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Text
$sel:authTokenUpdateStrategy:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe AuthTokenUpdateStrategyType
$sel:removeUserGroups:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Bool
$sel:applyImmediately:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Bool
$sel:notificationTopicStatus:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Text
$sel:userGroupIdsToRemove:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe [Text]
$sel:snapshotRetentionLimit:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Int
$sel:nodeGroupId:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Text
$sel:userGroupIdsToAdd:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe [Text]
$sel:multiAZEnabled:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Bool
$sel:preferredMaintenanceWindow:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Text
$sel:primaryClusterId:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Text
$sel:authToken:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Text
$sel:logDeliveryConfigurations:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe [LogDeliveryConfigurationRequest]
$sel:snapshotWindow:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Text
$sel:replicationGroupDescription:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Text
$sel:cacheParameterGroupName:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Text
$sel:autoMinorVersionUpgrade:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Bool
$sel:securityGroupIds:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe [Text]
$sel:snapshottingClusterId:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Text
$sel:cacheNodeType:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Text
$sel:engineVersion:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Text
$sel:automaticFailoverEnabled:ModifyReplicationGroup' :: ModifyReplicationGroup -> Maybe Bool
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"ModifyReplicationGroup" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2015-02-02" :: Prelude.ByteString),
        ByteString
"AutomaticFailoverEnabled"
          ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
automaticFailoverEnabled,
        ByteString
"EngineVersion" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
engineVersion,
        ByteString
"CacheNodeType" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
cacheNodeType,
        ByteString
"SnapshottingClusterId"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
snapshottingClusterId,
        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
"AutoMinorVersionUpgrade"
          ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
autoMinorVersionUpgrade,
        ByteString
"CacheParameterGroupName"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
cacheParameterGroupName,
        ByteString
"ReplicationGroupDescription"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
replicationGroupDescription,
        ByteString
"SnapshotWindow" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
snapshotWindow,
        ByteString
"LogDeliveryConfigurations"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [LogDeliveryConfigurationRequest] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"LogDeliveryConfigurationRequest"
                ([LogDeliveryConfigurationRequest] -> QueryString)
-> Maybe [LogDeliveryConfigurationRequest] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [LogDeliveryConfigurationRequest]
logDeliveryConfigurations
            ),
        ByteString
"AuthToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
authToken,
        ByteString
"PrimaryClusterId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
primaryClusterId,
        ByteString
"PreferredMaintenanceWindow"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
preferredMaintenanceWindow,
        ByteString
"MultiAZEnabled" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
multiAZEnabled,
        ByteString
"UserGroupIdsToAdd"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
userGroupIdsToAdd
            ),
        ByteString
"NodeGroupId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nodeGroupId,
        ByteString
"SnapshotRetentionLimit"
          ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
snapshotRetentionLimit,
        ByteString
"UserGroupIdsToRemove"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
userGroupIdsToRemove
            ),
        ByteString
"NotificationTopicStatus"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
notificationTopicStatus,
        ByteString
"ApplyImmediately" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
applyImmediately,
        ByteString
"RemoveUserGroups" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
removeUserGroups,
        ByteString
"AuthTokenUpdateStrategy"
          ByteString -> Maybe AuthTokenUpdateStrategyType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe AuthTokenUpdateStrategyType
authTokenUpdateStrategy,
        ByteString
"NotificationTopicArn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
notificationTopicArn,
        ByteString
"CacheSecurityGroupNames"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"CacheSecurityGroupName"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
cacheSecurityGroupNames
            ),
        ByteString
"ReplicationGroupId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
replicationGroupId
      ]

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

-- |
-- Create a value of 'ModifyReplicationGroupResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'replicationGroup', 'modifyReplicationGroupResponse_replicationGroup' - Undocumented member.
--
-- 'httpStatus', 'modifyReplicationGroupResponse_httpStatus' - The response's http status code.
newModifyReplicationGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ModifyReplicationGroupResponse
newModifyReplicationGroupResponse :: Int -> ModifyReplicationGroupResponse
newModifyReplicationGroupResponse Int
pHttpStatus_ =
  ModifyReplicationGroupResponse' :: Maybe ReplicationGroup -> Int -> ModifyReplicationGroupResponse
ModifyReplicationGroupResponse'
    { $sel:replicationGroup:ModifyReplicationGroupResponse' :: Maybe ReplicationGroup
replicationGroup =
        Maybe ReplicationGroup
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ModifyReplicationGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

instance
  Prelude.NFData
    ModifyReplicationGroupResponse