{-# 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 #-}
module Amazonka.ElastiCache.ModifyReplicationGroupShardConfiguration
(
ModifyReplicationGroupShardConfiguration (..),
newModifyReplicationGroupShardConfiguration,
modifyReplicationGroupShardConfiguration_nodeGroupsToRetain,
modifyReplicationGroupShardConfiguration_reshardingConfiguration,
modifyReplicationGroupShardConfiguration_nodeGroupsToRemove,
modifyReplicationGroupShardConfiguration_replicationGroupId,
modifyReplicationGroupShardConfiguration_nodeGroupCount,
modifyReplicationGroupShardConfiguration_applyImmediately,
ModifyReplicationGroupShardConfigurationResponse (..),
newModifyReplicationGroupShardConfigurationResponse,
modifyReplicationGroupShardConfigurationResponse_replicationGroup,
modifyReplicationGroupShardConfigurationResponse_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
data ModifyReplicationGroupShardConfiguration = ModifyReplicationGroupShardConfiguration'
{
ModifyReplicationGroupShardConfiguration -> Maybe [Text]
nodeGroupsToRetain :: Prelude.Maybe [Prelude.Text],
ModifyReplicationGroupShardConfiguration
-> Maybe [ReshardingConfiguration]
reshardingConfiguration :: Prelude.Maybe [ReshardingConfiguration],
ModifyReplicationGroupShardConfiguration -> Maybe [Text]
nodeGroupsToRemove :: Prelude.Maybe [Prelude.Text],
ModifyReplicationGroupShardConfiguration -> Text
replicationGroupId :: Prelude.Text,
ModifyReplicationGroupShardConfiguration -> Int
nodeGroupCount :: Prelude.Int,
ModifyReplicationGroupShardConfiguration -> Bool
applyImmediately :: Prelude.Bool
}
deriving (ModifyReplicationGroupShardConfiguration
-> ModifyReplicationGroupShardConfiguration -> Bool
(ModifyReplicationGroupShardConfiguration
-> ModifyReplicationGroupShardConfiguration -> Bool)
-> (ModifyReplicationGroupShardConfiguration
-> ModifyReplicationGroupShardConfiguration -> Bool)
-> Eq ModifyReplicationGroupShardConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyReplicationGroupShardConfiguration
-> ModifyReplicationGroupShardConfiguration -> Bool
$c/= :: ModifyReplicationGroupShardConfiguration
-> ModifyReplicationGroupShardConfiguration -> Bool
== :: ModifyReplicationGroupShardConfiguration
-> ModifyReplicationGroupShardConfiguration -> Bool
$c== :: ModifyReplicationGroupShardConfiguration
-> ModifyReplicationGroupShardConfiguration -> Bool
Prelude.Eq, ReadPrec [ModifyReplicationGroupShardConfiguration]
ReadPrec ModifyReplicationGroupShardConfiguration
Int -> ReadS ModifyReplicationGroupShardConfiguration
ReadS [ModifyReplicationGroupShardConfiguration]
(Int -> ReadS ModifyReplicationGroupShardConfiguration)
-> ReadS [ModifyReplicationGroupShardConfiguration]
-> ReadPrec ModifyReplicationGroupShardConfiguration
-> ReadPrec [ModifyReplicationGroupShardConfiguration]
-> Read ModifyReplicationGroupShardConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyReplicationGroupShardConfiguration]
$creadListPrec :: ReadPrec [ModifyReplicationGroupShardConfiguration]
readPrec :: ReadPrec ModifyReplicationGroupShardConfiguration
$creadPrec :: ReadPrec ModifyReplicationGroupShardConfiguration
readList :: ReadS [ModifyReplicationGroupShardConfiguration]
$creadList :: ReadS [ModifyReplicationGroupShardConfiguration]
readsPrec :: Int -> ReadS ModifyReplicationGroupShardConfiguration
$creadsPrec :: Int -> ReadS ModifyReplicationGroupShardConfiguration
Prelude.Read, Int -> ModifyReplicationGroupShardConfiguration -> ShowS
[ModifyReplicationGroupShardConfiguration] -> ShowS
ModifyReplicationGroupShardConfiguration -> String
(Int -> ModifyReplicationGroupShardConfiguration -> ShowS)
-> (ModifyReplicationGroupShardConfiguration -> String)
-> ([ModifyReplicationGroupShardConfiguration] -> ShowS)
-> Show ModifyReplicationGroupShardConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyReplicationGroupShardConfiguration] -> ShowS
$cshowList :: [ModifyReplicationGroupShardConfiguration] -> ShowS
show :: ModifyReplicationGroupShardConfiguration -> String
$cshow :: ModifyReplicationGroupShardConfiguration -> String
showsPrec :: Int -> ModifyReplicationGroupShardConfiguration -> ShowS
$cshowsPrec :: Int -> ModifyReplicationGroupShardConfiguration -> ShowS
Prelude.Show, (forall x.
ModifyReplicationGroupShardConfiguration
-> Rep ModifyReplicationGroupShardConfiguration x)
-> (forall x.
Rep ModifyReplicationGroupShardConfiguration x
-> ModifyReplicationGroupShardConfiguration)
-> Generic ModifyReplicationGroupShardConfiguration
forall x.
Rep ModifyReplicationGroupShardConfiguration x
-> ModifyReplicationGroupShardConfiguration
forall x.
ModifyReplicationGroupShardConfiguration
-> Rep ModifyReplicationGroupShardConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModifyReplicationGroupShardConfiguration x
-> ModifyReplicationGroupShardConfiguration
$cfrom :: forall x.
ModifyReplicationGroupShardConfiguration
-> Rep ModifyReplicationGroupShardConfiguration x
Prelude.Generic)
newModifyReplicationGroupShardConfiguration ::
Prelude.Text ->
Prelude.Int ->
Prelude.Bool ->
ModifyReplicationGroupShardConfiguration
newModifyReplicationGroupShardConfiguration :: Text -> Int -> Bool -> ModifyReplicationGroupShardConfiguration
newModifyReplicationGroupShardConfiguration
Text
pReplicationGroupId_
Int
pNodeGroupCount_
Bool
pApplyImmediately_ =
ModifyReplicationGroupShardConfiguration' :: Maybe [Text]
-> Maybe [ReshardingConfiguration]
-> Maybe [Text]
-> Text
-> Int
-> Bool
-> ModifyReplicationGroupShardConfiguration
ModifyReplicationGroupShardConfiguration'
{ $sel:nodeGroupsToRetain:ModifyReplicationGroupShardConfiguration' :: Maybe [Text]
nodeGroupsToRetain =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:reshardingConfiguration:ModifyReplicationGroupShardConfiguration' :: Maybe [ReshardingConfiguration]
reshardingConfiguration =
Maybe [ReshardingConfiguration]
forall a. Maybe a
Prelude.Nothing,
$sel:nodeGroupsToRemove:ModifyReplicationGroupShardConfiguration' :: Maybe [Text]
nodeGroupsToRemove =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:replicationGroupId:ModifyReplicationGroupShardConfiguration' :: Text
replicationGroupId =
Text
pReplicationGroupId_,
$sel:nodeGroupCount:ModifyReplicationGroupShardConfiguration' :: Int
nodeGroupCount = Int
pNodeGroupCount_,
$sel:applyImmediately:ModifyReplicationGroupShardConfiguration' :: Bool
applyImmediately =
Bool
pApplyImmediately_
}
modifyReplicationGroupShardConfiguration_nodeGroupsToRetain :: Lens.Lens' ModifyReplicationGroupShardConfiguration (Prelude.Maybe [Prelude.Text])
modifyReplicationGroupShardConfiguration_nodeGroupsToRetain :: (Maybe [Text] -> f (Maybe [Text]))
-> ModifyReplicationGroupShardConfiguration
-> f ModifyReplicationGroupShardConfiguration
modifyReplicationGroupShardConfiguration_nodeGroupsToRetain = (ModifyReplicationGroupShardConfiguration -> Maybe [Text])
-> (ModifyReplicationGroupShardConfiguration
-> Maybe [Text] -> ModifyReplicationGroupShardConfiguration)
-> Lens
ModifyReplicationGroupShardConfiguration
ModifyReplicationGroupShardConfiguration
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroupShardConfiguration' {Maybe [Text]
nodeGroupsToRetain :: Maybe [Text]
$sel:nodeGroupsToRetain:ModifyReplicationGroupShardConfiguration' :: ModifyReplicationGroupShardConfiguration -> Maybe [Text]
nodeGroupsToRetain} -> Maybe [Text]
nodeGroupsToRetain) (\s :: ModifyReplicationGroupShardConfiguration
s@ModifyReplicationGroupShardConfiguration' {} Maybe [Text]
a -> ModifyReplicationGroupShardConfiguration
s {$sel:nodeGroupsToRetain:ModifyReplicationGroupShardConfiguration' :: Maybe [Text]
nodeGroupsToRetain = Maybe [Text]
a} :: ModifyReplicationGroupShardConfiguration) ((Maybe [Text] -> f (Maybe [Text]))
-> ModifyReplicationGroupShardConfiguration
-> f ModifyReplicationGroupShardConfiguration)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ModifyReplicationGroupShardConfiguration
-> f ModifyReplicationGroupShardConfiguration
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
modifyReplicationGroupShardConfiguration_reshardingConfiguration :: Lens.Lens' ModifyReplicationGroupShardConfiguration (Prelude.Maybe [ReshardingConfiguration])
modifyReplicationGroupShardConfiguration_reshardingConfiguration :: (Maybe [ReshardingConfiguration]
-> f (Maybe [ReshardingConfiguration]))
-> ModifyReplicationGroupShardConfiguration
-> f ModifyReplicationGroupShardConfiguration
modifyReplicationGroupShardConfiguration_reshardingConfiguration = (ModifyReplicationGroupShardConfiguration
-> Maybe [ReshardingConfiguration])
-> (ModifyReplicationGroupShardConfiguration
-> Maybe [ReshardingConfiguration]
-> ModifyReplicationGroupShardConfiguration)
-> Lens
ModifyReplicationGroupShardConfiguration
ModifyReplicationGroupShardConfiguration
(Maybe [ReshardingConfiguration])
(Maybe [ReshardingConfiguration])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroupShardConfiguration' {Maybe [ReshardingConfiguration]
reshardingConfiguration :: Maybe [ReshardingConfiguration]
$sel:reshardingConfiguration:ModifyReplicationGroupShardConfiguration' :: ModifyReplicationGroupShardConfiguration
-> Maybe [ReshardingConfiguration]
reshardingConfiguration} -> Maybe [ReshardingConfiguration]
reshardingConfiguration) (\s :: ModifyReplicationGroupShardConfiguration
s@ModifyReplicationGroupShardConfiguration' {} Maybe [ReshardingConfiguration]
a -> ModifyReplicationGroupShardConfiguration
s {$sel:reshardingConfiguration:ModifyReplicationGroupShardConfiguration' :: Maybe [ReshardingConfiguration]
reshardingConfiguration = Maybe [ReshardingConfiguration]
a} :: ModifyReplicationGroupShardConfiguration) ((Maybe [ReshardingConfiguration]
-> f (Maybe [ReshardingConfiguration]))
-> ModifyReplicationGroupShardConfiguration
-> f ModifyReplicationGroupShardConfiguration)
-> ((Maybe [ReshardingConfiguration]
-> f (Maybe [ReshardingConfiguration]))
-> Maybe [ReshardingConfiguration]
-> f (Maybe [ReshardingConfiguration]))
-> (Maybe [ReshardingConfiguration]
-> f (Maybe [ReshardingConfiguration]))
-> ModifyReplicationGroupShardConfiguration
-> f ModifyReplicationGroupShardConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ReshardingConfiguration]
[ReshardingConfiguration]
[ReshardingConfiguration]
[ReshardingConfiguration]
-> Iso
(Maybe [ReshardingConfiguration])
(Maybe [ReshardingConfiguration])
(Maybe [ReshardingConfiguration])
(Maybe [ReshardingConfiguration])
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
[ReshardingConfiguration]
[ReshardingConfiguration]
[ReshardingConfiguration]
[ReshardingConfiguration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
modifyReplicationGroupShardConfiguration_nodeGroupsToRemove :: Lens.Lens' ModifyReplicationGroupShardConfiguration (Prelude.Maybe [Prelude.Text])
modifyReplicationGroupShardConfiguration_nodeGroupsToRemove :: (Maybe [Text] -> f (Maybe [Text]))
-> ModifyReplicationGroupShardConfiguration
-> f ModifyReplicationGroupShardConfiguration
modifyReplicationGroupShardConfiguration_nodeGroupsToRemove = (ModifyReplicationGroupShardConfiguration -> Maybe [Text])
-> (ModifyReplicationGroupShardConfiguration
-> Maybe [Text] -> ModifyReplicationGroupShardConfiguration)
-> Lens
ModifyReplicationGroupShardConfiguration
ModifyReplicationGroupShardConfiguration
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroupShardConfiguration' {Maybe [Text]
nodeGroupsToRemove :: Maybe [Text]
$sel:nodeGroupsToRemove:ModifyReplicationGroupShardConfiguration' :: ModifyReplicationGroupShardConfiguration -> Maybe [Text]
nodeGroupsToRemove} -> Maybe [Text]
nodeGroupsToRemove) (\s :: ModifyReplicationGroupShardConfiguration
s@ModifyReplicationGroupShardConfiguration' {} Maybe [Text]
a -> ModifyReplicationGroupShardConfiguration
s {$sel:nodeGroupsToRemove:ModifyReplicationGroupShardConfiguration' :: Maybe [Text]
nodeGroupsToRemove = Maybe [Text]
a} :: ModifyReplicationGroupShardConfiguration) ((Maybe [Text] -> f (Maybe [Text]))
-> ModifyReplicationGroupShardConfiguration
-> f ModifyReplicationGroupShardConfiguration)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ModifyReplicationGroupShardConfiguration
-> f ModifyReplicationGroupShardConfiguration
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
modifyReplicationGroupShardConfiguration_replicationGroupId :: Lens.Lens' ModifyReplicationGroupShardConfiguration Prelude.Text
modifyReplicationGroupShardConfiguration_replicationGroupId :: (Text -> f Text)
-> ModifyReplicationGroupShardConfiguration
-> f ModifyReplicationGroupShardConfiguration
modifyReplicationGroupShardConfiguration_replicationGroupId = (ModifyReplicationGroupShardConfiguration -> Text)
-> (ModifyReplicationGroupShardConfiguration
-> Text -> ModifyReplicationGroupShardConfiguration)
-> Lens
ModifyReplicationGroupShardConfiguration
ModifyReplicationGroupShardConfiguration
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroupShardConfiguration' {Text
replicationGroupId :: Text
$sel:replicationGroupId:ModifyReplicationGroupShardConfiguration' :: ModifyReplicationGroupShardConfiguration -> Text
replicationGroupId} -> Text
replicationGroupId) (\s :: ModifyReplicationGroupShardConfiguration
s@ModifyReplicationGroupShardConfiguration' {} Text
a -> ModifyReplicationGroupShardConfiguration
s {$sel:replicationGroupId:ModifyReplicationGroupShardConfiguration' :: Text
replicationGroupId = Text
a} :: ModifyReplicationGroupShardConfiguration)
modifyReplicationGroupShardConfiguration_nodeGroupCount :: Lens.Lens' ModifyReplicationGroupShardConfiguration Prelude.Int
modifyReplicationGroupShardConfiguration_nodeGroupCount :: (Int -> f Int)
-> ModifyReplicationGroupShardConfiguration
-> f ModifyReplicationGroupShardConfiguration
modifyReplicationGroupShardConfiguration_nodeGroupCount = (ModifyReplicationGroupShardConfiguration -> Int)
-> (ModifyReplicationGroupShardConfiguration
-> Int -> ModifyReplicationGroupShardConfiguration)
-> Lens
ModifyReplicationGroupShardConfiguration
ModifyReplicationGroupShardConfiguration
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroupShardConfiguration' {Int
nodeGroupCount :: Int
$sel:nodeGroupCount:ModifyReplicationGroupShardConfiguration' :: ModifyReplicationGroupShardConfiguration -> Int
nodeGroupCount} -> Int
nodeGroupCount) (\s :: ModifyReplicationGroupShardConfiguration
s@ModifyReplicationGroupShardConfiguration' {} Int
a -> ModifyReplicationGroupShardConfiguration
s {$sel:nodeGroupCount:ModifyReplicationGroupShardConfiguration' :: Int
nodeGroupCount = Int
a} :: ModifyReplicationGroupShardConfiguration)
modifyReplicationGroupShardConfiguration_applyImmediately :: Lens.Lens' ModifyReplicationGroupShardConfiguration Prelude.Bool
modifyReplicationGroupShardConfiguration_applyImmediately :: (Bool -> f Bool)
-> ModifyReplicationGroupShardConfiguration
-> f ModifyReplicationGroupShardConfiguration
modifyReplicationGroupShardConfiguration_applyImmediately = (ModifyReplicationGroupShardConfiguration -> Bool)
-> (ModifyReplicationGroupShardConfiguration
-> Bool -> ModifyReplicationGroupShardConfiguration)
-> Lens
ModifyReplicationGroupShardConfiguration
ModifyReplicationGroupShardConfiguration
Bool
Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroupShardConfiguration' {Bool
applyImmediately :: Bool
$sel:applyImmediately:ModifyReplicationGroupShardConfiguration' :: ModifyReplicationGroupShardConfiguration -> Bool
applyImmediately} -> Bool
applyImmediately) (\s :: ModifyReplicationGroupShardConfiguration
s@ModifyReplicationGroupShardConfiguration' {} Bool
a -> ModifyReplicationGroupShardConfiguration
s {$sel:applyImmediately:ModifyReplicationGroupShardConfiguration' :: Bool
applyImmediately = Bool
a} :: ModifyReplicationGroupShardConfiguration)
instance
Core.AWSRequest
ModifyReplicationGroupShardConfiguration
where
type
AWSResponse
ModifyReplicationGroupShardConfiguration =
ModifyReplicationGroupShardConfigurationResponse
request :: ModifyReplicationGroupShardConfiguration
-> Request ModifyReplicationGroupShardConfiguration
request = Service
-> ModifyReplicationGroupShardConfiguration
-> Request ModifyReplicationGroupShardConfiguration
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy ModifyReplicationGroupShardConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse ModifyReplicationGroupShardConfiguration)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either
String (AWSResponse ModifyReplicationGroupShardConfiguration))
-> Logger
-> Service
-> Proxy ModifyReplicationGroupShardConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse ModifyReplicationGroupShardConfiguration)))
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
"ModifyReplicationGroupShardConfigurationResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe ReplicationGroup
-> Int -> ModifyReplicationGroupShardConfigurationResponse
ModifyReplicationGroupShardConfigurationResponse'
(Maybe ReplicationGroup
-> Int -> ModifyReplicationGroupShardConfigurationResponse)
-> Either String (Maybe ReplicationGroup)
-> Either
String (Int -> ModifyReplicationGroupShardConfigurationResponse)
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 -> ModifyReplicationGroupShardConfigurationResponse)
-> Either String Int
-> Either String ModifyReplicationGroupShardConfigurationResponse
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
ModifyReplicationGroupShardConfiguration
instance
Prelude.NFData
ModifyReplicationGroupShardConfiguration
instance
Core.ToHeaders
ModifyReplicationGroupShardConfiguration
where
toHeaders :: ModifyReplicationGroupShardConfiguration -> ResponseHeaders
toHeaders = ResponseHeaders
-> ModifyReplicationGroupShardConfiguration -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance
Core.ToPath
ModifyReplicationGroupShardConfiguration
where
toPath :: ModifyReplicationGroupShardConfiguration -> ByteString
toPath = ByteString
-> ModifyReplicationGroupShardConfiguration -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
ModifyReplicationGroupShardConfiguration
where
toQuery :: ModifyReplicationGroupShardConfiguration -> QueryString
toQuery ModifyReplicationGroupShardConfiguration' {Bool
Int
Maybe [Text]
Maybe [ReshardingConfiguration]
Text
applyImmediately :: Bool
nodeGroupCount :: Int
replicationGroupId :: Text
nodeGroupsToRemove :: Maybe [Text]
reshardingConfiguration :: Maybe [ReshardingConfiguration]
nodeGroupsToRetain :: Maybe [Text]
$sel:applyImmediately:ModifyReplicationGroupShardConfiguration' :: ModifyReplicationGroupShardConfiguration -> Bool
$sel:nodeGroupCount:ModifyReplicationGroupShardConfiguration' :: ModifyReplicationGroupShardConfiguration -> Int
$sel:replicationGroupId:ModifyReplicationGroupShardConfiguration' :: ModifyReplicationGroupShardConfiguration -> Text
$sel:nodeGroupsToRemove:ModifyReplicationGroupShardConfiguration' :: ModifyReplicationGroupShardConfiguration -> Maybe [Text]
$sel:reshardingConfiguration:ModifyReplicationGroupShardConfiguration' :: ModifyReplicationGroupShardConfiguration
-> Maybe [ReshardingConfiguration]
$sel:nodeGroupsToRetain:ModifyReplicationGroupShardConfiguration' :: ModifyReplicationGroupShardConfiguration -> 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
"ModifyReplicationGroupShardConfiguration" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2015-02-02" :: Prelude.ByteString),
ByteString
"NodeGroupsToRetain"
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
"NodeGroupToRetain"
([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
nodeGroupsToRetain
),
ByteString
"ReshardingConfiguration"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString -> [ReshardingConfiguration] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"ReshardingConfiguration"
([ReshardingConfiguration] -> QueryString)
-> Maybe [ReshardingConfiguration] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ReshardingConfiguration]
reshardingConfiguration
),
ByteString
"NodeGroupsToRemove"
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
"NodeGroupToRemove"
([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
nodeGroupsToRemove
),
ByteString
"ReplicationGroupId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
replicationGroupId,
ByteString
"NodeGroupCount" ByteString -> Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Int
nodeGroupCount,
ByteString
"ApplyImmediately" ByteString -> Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Bool
applyImmediately
]
data ModifyReplicationGroupShardConfigurationResponse = ModifyReplicationGroupShardConfigurationResponse'
{ ModifyReplicationGroupShardConfigurationResponse
-> Maybe ReplicationGroup
replicationGroup :: Prelude.Maybe ReplicationGroup,
ModifyReplicationGroupShardConfigurationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ModifyReplicationGroupShardConfigurationResponse
-> ModifyReplicationGroupShardConfigurationResponse -> Bool
(ModifyReplicationGroupShardConfigurationResponse
-> ModifyReplicationGroupShardConfigurationResponse -> Bool)
-> (ModifyReplicationGroupShardConfigurationResponse
-> ModifyReplicationGroupShardConfigurationResponse -> Bool)
-> Eq ModifyReplicationGroupShardConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyReplicationGroupShardConfigurationResponse
-> ModifyReplicationGroupShardConfigurationResponse -> Bool
$c/= :: ModifyReplicationGroupShardConfigurationResponse
-> ModifyReplicationGroupShardConfigurationResponse -> Bool
== :: ModifyReplicationGroupShardConfigurationResponse
-> ModifyReplicationGroupShardConfigurationResponse -> Bool
$c== :: ModifyReplicationGroupShardConfigurationResponse
-> ModifyReplicationGroupShardConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [ModifyReplicationGroupShardConfigurationResponse]
ReadPrec ModifyReplicationGroupShardConfigurationResponse
Int -> ReadS ModifyReplicationGroupShardConfigurationResponse
ReadS [ModifyReplicationGroupShardConfigurationResponse]
(Int -> ReadS ModifyReplicationGroupShardConfigurationResponse)
-> ReadS [ModifyReplicationGroupShardConfigurationResponse]
-> ReadPrec ModifyReplicationGroupShardConfigurationResponse
-> ReadPrec [ModifyReplicationGroupShardConfigurationResponse]
-> Read ModifyReplicationGroupShardConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyReplicationGroupShardConfigurationResponse]
$creadListPrec :: ReadPrec [ModifyReplicationGroupShardConfigurationResponse]
readPrec :: ReadPrec ModifyReplicationGroupShardConfigurationResponse
$creadPrec :: ReadPrec ModifyReplicationGroupShardConfigurationResponse
readList :: ReadS [ModifyReplicationGroupShardConfigurationResponse]
$creadList :: ReadS [ModifyReplicationGroupShardConfigurationResponse]
readsPrec :: Int -> ReadS ModifyReplicationGroupShardConfigurationResponse
$creadsPrec :: Int -> ReadS ModifyReplicationGroupShardConfigurationResponse
Prelude.Read, Int -> ModifyReplicationGroupShardConfigurationResponse -> ShowS
[ModifyReplicationGroupShardConfigurationResponse] -> ShowS
ModifyReplicationGroupShardConfigurationResponse -> String
(Int -> ModifyReplicationGroupShardConfigurationResponse -> ShowS)
-> (ModifyReplicationGroupShardConfigurationResponse -> String)
-> ([ModifyReplicationGroupShardConfigurationResponse] -> ShowS)
-> Show ModifyReplicationGroupShardConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyReplicationGroupShardConfigurationResponse] -> ShowS
$cshowList :: [ModifyReplicationGroupShardConfigurationResponse] -> ShowS
show :: ModifyReplicationGroupShardConfigurationResponse -> String
$cshow :: ModifyReplicationGroupShardConfigurationResponse -> String
showsPrec :: Int -> ModifyReplicationGroupShardConfigurationResponse -> ShowS
$cshowsPrec :: Int -> ModifyReplicationGroupShardConfigurationResponse -> ShowS
Prelude.Show, (forall x.
ModifyReplicationGroupShardConfigurationResponse
-> Rep ModifyReplicationGroupShardConfigurationResponse x)
-> (forall x.
Rep ModifyReplicationGroupShardConfigurationResponse x
-> ModifyReplicationGroupShardConfigurationResponse)
-> Generic ModifyReplicationGroupShardConfigurationResponse
forall x.
Rep ModifyReplicationGroupShardConfigurationResponse x
-> ModifyReplicationGroupShardConfigurationResponse
forall x.
ModifyReplicationGroupShardConfigurationResponse
-> Rep ModifyReplicationGroupShardConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModifyReplicationGroupShardConfigurationResponse x
-> ModifyReplicationGroupShardConfigurationResponse
$cfrom :: forall x.
ModifyReplicationGroupShardConfigurationResponse
-> Rep ModifyReplicationGroupShardConfigurationResponse x
Prelude.Generic)
newModifyReplicationGroupShardConfigurationResponse ::
Prelude.Int ->
ModifyReplicationGroupShardConfigurationResponse
newModifyReplicationGroupShardConfigurationResponse :: Int -> ModifyReplicationGroupShardConfigurationResponse
newModifyReplicationGroupShardConfigurationResponse
Int
pHttpStatus_ =
ModifyReplicationGroupShardConfigurationResponse' :: Maybe ReplicationGroup
-> Int -> ModifyReplicationGroupShardConfigurationResponse
ModifyReplicationGroupShardConfigurationResponse'
{ $sel:replicationGroup:ModifyReplicationGroupShardConfigurationResponse' :: Maybe ReplicationGroup
replicationGroup =
Maybe ReplicationGroup
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ModifyReplicationGroupShardConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
}
modifyReplicationGroupShardConfigurationResponse_replicationGroup :: Lens.Lens' ModifyReplicationGroupShardConfigurationResponse (Prelude.Maybe ReplicationGroup)
modifyReplicationGroupShardConfigurationResponse_replicationGroup :: (Maybe ReplicationGroup -> f (Maybe ReplicationGroup))
-> ModifyReplicationGroupShardConfigurationResponse
-> f ModifyReplicationGroupShardConfigurationResponse
modifyReplicationGroupShardConfigurationResponse_replicationGroup = (ModifyReplicationGroupShardConfigurationResponse
-> Maybe ReplicationGroup)
-> (ModifyReplicationGroupShardConfigurationResponse
-> Maybe ReplicationGroup
-> ModifyReplicationGroupShardConfigurationResponse)
-> Lens
ModifyReplicationGroupShardConfigurationResponse
ModifyReplicationGroupShardConfigurationResponse
(Maybe ReplicationGroup)
(Maybe ReplicationGroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroupShardConfigurationResponse' {Maybe ReplicationGroup
replicationGroup :: Maybe ReplicationGroup
$sel:replicationGroup:ModifyReplicationGroupShardConfigurationResponse' :: ModifyReplicationGroupShardConfigurationResponse
-> Maybe ReplicationGroup
replicationGroup} -> Maybe ReplicationGroup
replicationGroup) (\s :: ModifyReplicationGroupShardConfigurationResponse
s@ModifyReplicationGroupShardConfigurationResponse' {} Maybe ReplicationGroup
a -> ModifyReplicationGroupShardConfigurationResponse
s {$sel:replicationGroup:ModifyReplicationGroupShardConfigurationResponse' :: Maybe ReplicationGroup
replicationGroup = Maybe ReplicationGroup
a} :: ModifyReplicationGroupShardConfigurationResponse)
modifyReplicationGroupShardConfigurationResponse_httpStatus :: Lens.Lens' ModifyReplicationGroupShardConfigurationResponse Prelude.Int
modifyReplicationGroupShardConfigurationResponse_httpStatus :: (Int -> f Int)
-> ModifyReplicationGroupShardConfigurationResponse
-> f ModifyReplicationGroupShardConfigurationResponse
modifyReplicationGroupShardConfigurationResponse_httpStatus = (ModifyReplicationGroupShardConfigurationResponse -> Int)
-> (ModifyReplicationGroupShardConfigurationResponse
-> Int -> ModifyReplicationGroupShardConfigurationResponse)
-> Lens
ModifyReplicationGroupShardConfigurationResponse
ModifyReplicationGroupShardConfigurationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationGroupShardConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:ModifyReplicationGroupShardConfigurationResponse' :: ModifyReplicationGroupShardConfigurationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ModifyReplicationGroupShardConfigurationResponse
s@ModifyReplicationGroupShardConfigurationResponse' {} Int
a -> ModifyReplicationGroupShardConfigurationResponse
s {$sel:httpStatus:ModifyReplicationGroupShardConfigurationResponse' :: Int
httpStatus = Int
a} :: ModifyReplicationGroupShardConfigurationResponse)
instance
Prelude.NFData
ModifyReplicationGroupShardConfigurationResponse