{-# 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.DocumentDB.ModifyDBClusterParameterGroup
(
ModifyDBClusterParameterGroup (..),
newModifyDBClusterParameterGroup,
modifyDBClusterParameterGroup_dbClusterParameterGroupName,
modifyDBClusterParameterGroup_parameters,
DBClusterParameterGroupNameMessage (..),
newDBClusterParameterGroupNameMessage,
dbClusterParameterGroupNameMessage_dbClusterParameterGroupName,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DocumentDB.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ModifyDBClusterParameterGroup = ModifyDBClusterParameterGroup'
{
ModifyDBClusterParameterGroup -> Text
dbClusterParameterGroupName :: Prelude.Text,
ModifyDBClusterParameterGroup -> [Parameter]
parameters :: [Parameter]
}
deriving (ModifyDBClusterParameterGroup
-> ModifyDBClusterParameterGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyDBClusterParameterGroup
-> ModifyDBClusterParameterGroup -> Bool
$c/= :: ModifyDBClusterParameterGroup
-> ModifyDBClusterParameterGroup -> Bool
== :: ModifyDBClusterParameterGroup
-> ModifyDBClusterParameterGroup -> Bool
$c== :: ModifyDBClusterParameterGroup
-> ModifyDBClusterParameterGroup -> Bool
Prelude.Eq, ReadPrec [ModifyDBClusterParameterGroup]
ReadPrec ModifyDBClusterParameterGroup
Int -> ReadS ModifyDBClusterParameterGroup
ReadS [ModifyDBClusterParameterGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyDBClusterParameterGroup]
$creadListPrec :: ReadPrec [ModifyDBClusterParameterGroup]
readPrec :: ReadPrec ModifyDBClusterParameterGroup
$creadPrec :: ReadPrec ModifyDBClusterParameterGroup
readList :: ReadS [ModifyDBClusterParameterGroup]
$creadList :: ReadS [ModifyDBClusterParameterGroup]
readsPrec :: Int -> ReadS ModifyDBClusterParameterGroup
$creadsPrec :: Int -> ReadS ModifyDBClusterParameterGroup
Prelude.Read, Int -> ModifyDBClusterParameterGroup -> ShowS
[ModifyDBClusterParameterGroup] -> ShowS
ModifyDBClusterParameterGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyDBClusterParameterGroup] -> ShowS
$cshowList :: [ModifyDBClusterParameterGroup] -> ShowS
show :: ModifyDBClusterParameterGroup -> String
$cshow :: ModifyDBClusterParameterGroup -> String
showsPrec :: Int -> ModifyDBClusterParameterGroup -> ShowS
$cshowsPrec :: Int -> ModifyDBClusterParameterGroup -> ShowS
Prelude.Show, forall x.
Rep ModifyDBClusterParameterGroup x
-> ModifyDBClusterParameterGroup
forall x.
ModifyDBClusterParameterGroup
-> Rep ModifyDBClusterParameterGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModifyDBClusterParameterGroup x
-> ModifyDBClusterParameterGroup
$cfrom :: forall x.
ModifyDBClusterParameterGroup
-> Rep ModifyDBClusterParameterGroup x
Prelude.Generic)
newModifyDBClusterParameterGroup ::
Prelude.Text ->
ModifyDBClusterParameterGroup
newModifyDBClusterParameterGroup :: Text -> ModifyDBClusterParameterGroup
newModifyDBClusterParameterGroup
Text
pDBClusterParameterGroupName_ =
ModifyDBClusterParameterGroup'
{ $sel:dbClusterParameterGroupName:ModifyDBClusterParameterGroup' :: Text
dbClusterParameterGroupName =
Text
pDBClusterParameterGroupName_,
$sel:parameters:ModifyDBClusterParameterGroup' :: [Parameter]
parameters = forall a. Monoid a => a
Prelude.mempty
}
modifyDBClusterParameterGroup_dbClusterParameterGroupName :: Lens.Lens' ModifyDBClusterParameterGroup Prelude.Text
modifyDBClusterParameterGroup_dbClusterParameterGroupName :: Lens' ModifyDBClusterParameterGroup Text
modifyDBClusterParameterGroup_dbClusterParameterGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyDBClusterParameterGroup' {Text
dbClusterParameterGroupName :: Text
$sel:dbClusterParameterGroupName:ModifyDBClusterParameterGroup' :: ModifyDBClusterParameterGroup -> Text
dbClusterParameterGroupName} -> Text
dbClusterParameterGroupName) (\s :: ModifyDBClusterParameterGroup
s@ModifyDBClusterParameterGroup' {} Text
a -> ModifyDBClusterParameterGroup
s {$sel:dbClusterParameterGroupName:ModifyDBClusterParameterGroup' :: Text
dbClusterParameterGroupName = Text
a} :: ModifyDBClusterParameterGroup)
modifyDBClusterParameterGroup_parameters :: Lens.Lens' ModifyDBClusterParameterGroup [Parameter]
modifyDBClusterParameterGroup_parameters :: Lens' ModifyDBClusterParameterGroup [Parameter]
modifyDBClusterParameterGroup_parameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyDBClusterParameterGroup' {[Parameter]
parameters :: [Parameter]
$sel:parameters:ModifyDBClusterParameterGroup' :: ModifyDBClusterParameterGroup -> [Parameter]
parameters} -> [Parameter]
parameters) (\s :: ModifyDBClusterParameterGroup
s@ModifyDBClusterParameterGroup' {} [Parameter]
a -> ModifyDBClusterParameterGroup
s {$sel:parameters:ModifyDBClusterParameterGroup' :: [Parameter]
parameters = [Parameter]
a} :: ModifyDBClusterParameterGroup) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Core.AWSRequest
ModifyDBClusterParameterGroup
where
type
AWSResponse ModifyDBClusterParameterGroup =
DBClusterParameterGroupNameMessage
request :: (Service -> Service)
-> ModifyDBClusterParameterGroup
-> Request ModifyDBClusterParameterGroup
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ModifyDBClusterParameterGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ModifyDBClusterParameterGroup)))
response =
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"ModifyDBClusterParameterGroupResult"
(\Int
s ResponseHeaders
h [Node]
x -> forall a. FromXML a => [Node] -> Either String a
Data.parseXML [Node]
x)
instance
Prelude.Hashable
ModifyDBClusterParameterGroup
where
hashWithSalt :: Int -> ModifyDBClusterParameterGroup -> Int
hashWithSalt Int
_salt ModifyDBClusterParameterGroup' {[Parameter]
Text
parameters :: [Parameter]
dbClusterParameterGroupName :: Text
$sel:parameters:ModifyDBClusterParameterGroup' :: ModifyDBClusterParameterGroup -> [Parameter]
$sel:dbClusterParameterGroupName:ModifyDBClusterParameterGroup' :: ModifyDBClusterParameterGroup -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dbClusterParameterGroupName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Parameter]
parameters
instance Prelude.NFData ModifyDBClusterParameterGroup where
rnf :: ModifyDBClusterParameterGroup -> ()
rnf ModifyDBClusterParameterGroup' {[Parameter]
Text
parameters :: [Parameter]
dbClusterParameterGroupName :: Text
$sel:parameters:ModifyDBClusterParameterGroup' :: ModifyDBClusterParameterGroup -> [Parameter]
$sel:dbClusterParameterGroupName:ModifyDBClusterParameterGroup' :: ModifyDBClusterParameterGroup -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
dbClusterParameterGroupName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Parameter]
parameters
instance Data.ToHeaders ModifyDBClusterParameterGroup where
toHeaders :: ModifyDBClusterParameterGroup -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath ModifyDBClusterParameterGroup where
toPath :: ModifyDBClusterParameterGroup -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery ModifyDBClusterParameterGroup where
toQuery :: ModifyDBClusterParameterGroup -> QueryString
toQuery ModifyDBClusterParameterGroup' {[Parameter]
Text
parameters :: [Parameter]
dbClusterParameterGroupName :: Text
$sel:parameters:ModifyDBClusterParameterGroup' :: ModifyDBClusterParameterGroup -> [Parameter]
$sel:dbClusterParameterGroupName:ModifyDBClusterParameterGroup' :: ModifyDBClusterParameterGroup -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"ModifyDBClusterParameterGroup" ::
Prelude.ByteString
),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
ByteString
"DBClusterParameterGroupName"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
dbClusterParameterGroupName,
ByteString
"Parameters"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"Parameter" [Parameter]
parameters
]