{-# 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.RDS.ModifyDBParameterGroup
(
ModifyDBParameterGroup (..),
newModifyDBParameterGroup,
modifyDBParameterGroup_dbParameterGroupName,
modifyDBParameterGroup_parameters,
DBParameterGroupNameMessage (..),
newDBParameterGroupNameMessage,
dbParameterGroupNameMessage_dbParameterGroupName,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.RDS.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ModifyDBParameterGroup = ModifyDBParameterGroup'
{
ModifyDBParameterGroup -> Text
dbParameterGroupName :: Prelude.Text,
ModifyDBParameterGroup -> [Parameter]
parameters :: [Parameter]
}
deriving (ModifyDBParameterGroup -> ModifyDBParameterGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyDBParameterGroup -> ModifyDBParameterGroup -> Bool
$c/= :: ModifyDBParameterGroup -> ModifyDBParameterGroup -> Bool
== :: ModifyDBParameterGroup -> ModifyDBParameterGroup -> Bool
$c== :: ModifyDBParameterGroup -> ModifyDBParameterGroup -> Bool
Prelude.Eq, ReadPrec [ModifyDBParameterGroup]
ReadPrec ModifyDBParameterGroup
Int -> ReadS ModifyDBParameterGroup
ReadS [ModifyDBParameterGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyDBParameterGroup]
$creadListPrec :: ReadPrec [ModifyDBParameterGroup]
readPrec :: ReadPrec ModifyDBParameterGroup
$creadPrec :: ReadPrec ModifyDBParameterGroup
readList :: ReadS [ModifyDBParameterGroup]
$creadList :: ReadS [ModifyDBParameterGroup]
readsPrec :: Int -> ReadS ModifyDBParameterGroup
$creadsPrec :: Int -> ReadS ModifyDBParameterGroup
Prelude.Read, Int -> ModifyDBParameterGroup -> ShowS
[ModifyDBParameterGroup] -> ShowS
ModifyDBParameterGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyDBParameterGroup] -> ShowS
$cshowList :: [ModifyDBParameterGroup] -> ShowS
show :: ModifyDBParameterGroup -> String
$cshow :: ModifyDBParameterGroup -> String
showsPrec :: Int -> ModifyDBParameterGroup -> ShowS
$cshowsPrec :: Int -> ModifyDBParameterGroup -> ShowS
Prelude.Show, forall x. Rep ModifyDBParameterGroup x -> ModifyDBParameterGroup
forall x. ModifyDBParameterGroup -> Rep ModifyDBParameterGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModifyDBParameterGroup x -> ModifyDBParameterGroup
$cfrom :: forall x. ModifyDBParameterGroup -> Rep ModifyDBParameterGroup x
Prelude.Generic)
newModifyDBParameterGroup ::
Prelude.Text ->
ModifyDBParameterGroup
newModifyDBParameterGroup :: Text -> ModifyDBParameterGroup
newModifyDBParameterGroup Text
pDBParameterGroupName_ =
ModifyDBParameterGroup'
{ $sel:dbParameterGroupName:ModifyDBParameterGroup' :: Text
dbParameterGroupName =
Text
pDBParameterGroupName_,
$sel:parameters:ModifyDBParameterGroup' :: [Parameter]
parameters = forall a. Monoid a => a
Prelude.mempty
}
modifyDBParameterGroup_dbParameterGroupName :: Lens.Lens' ModifyDBParameterGroup Prelude.Text
modifyDBParameterGroup_dbParameterGroupName :: Lens' ModifyDBParameterGroup Text
modifyDBParameterGroup_dbParameterGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyDBParameterGroup' {Text
dbParameterGroupName :: Text
$sel:dbParameterGroupName:ModifyDBParameterGroup' :: ModifyDBParameterGroup -> Text
dbParameterGroupName} -> Text
dbParameterGroupName) (\s :: ModifyDBParameterGroup
s@ModifyDBParameterGroup' {} Text
a -> ModifyDBParameterGroup
s {$sel:dbParameterGroupName:ModifyDBParameterGroup' :: Text
dbParameterGroupName = Text
a} :: ModifyDBParameterGroup)
modifyDBParameterGroup_parameters :: Lens.Lens' ModifyDBParameterGroup [Parameter]
modifyDBParameterGroup_parameters :: Lens' ModifyDBParameterGroup [Parameter]
modifyDBParameterGroup_parameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyDBParameterGroup' {[Parameter]
parameters :: [Parameter]
$sel:parameters:ModifyDBParameterGroup' :: ModifyDBParameterGroup -> [Parameter]
parameters} -> [Parameter]
parameters) (\s :: ModifyDBParameterGroup
s@ModifyDBParameterGroup' {} [Parameter]
a -> ModifyDBParameterGroup
s {$sel:parameters:ModifyDBParameterGroup' :: [Parameter]
parameters = [Parameter]
a} :: ModifyDBParameterGroup) 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 ModifyDBParameterGroup where
type
AWSResponse ModifyDBParameterGroup =
DBParameterGroupNameMessage
request :: (Service -> Service)
-> ModifyDBParameterGroup -> Request ModifyDBParameterGroup
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 ModifyDBParameterGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ModifyDBParameterGroup)))
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
"ModifyDBParameterGroupResult"
(\Int
s ResponseHeaders
h [Node]
x -> forall a. FromXML a => [Node] -> Either String a
Data.parseXML [Node]
x)
instance Prelude.Hashable ModifyDBParameterGroup where
hashWithSalt :: Int -> ModifyDBParameterGroup -> Int
hashWithSalt Int
_salt ModifyDBParameterGroup' {[Parameter]
Text
parameters :: [Parameter]
dbParameterGroupName :: Text
$sel:parameters:ModifyDBParameterGroup' :: ModifyDBParameterGroup -> [Parameter]
$sel:dbParameterGroupName:ModifyDBParameterGroup' :: ModifyDBParameterGroup -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dbParameterGroupName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Parameter]
parameters
instance Prelude.NFData ModifyDBParameterGroup where
rnf :: ModifyDBParameterGroup -> ()
rnf ModifyDBParameterGroup' {[Parameter]
Text
parameters :: [Parameter]
dbParameterGroupName :: Text
$sel:parameters:ModifyDBParameterGroup' :: ModifyDBParameterGroup -> [Parameter]
$sel:dbParameterGroupName:ModifyDBParameterGroup' :: ModifyDBParameterGroup -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
dbParameterGroupName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Parameter]
parameters
instance Data.ToHeaders ModifyDBParameterGroup where
toHeaders :: ModifyDBParameterGroup -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath ModifyDBParameterGroup where
toPath :: ModifyDBParameterGroup -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery ModifyDBParameterGroup where
toQuery :: ModifyDBParameterGroup -> QueryString
toQuery ModifyDBParameterGroup' {[Parameter]
Text
parameters :: [Parameter]
dbParameterGroupName :: Text
$sel:parameters:ModifyDBParameterGroup' :: ModifyDBParameterGroup -> [Parameter]
$sel:dbParameterGroupName:ModifyDBParameterGroup' :: ModifyDBParameterGroup -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"ModifyDBParameterGroup" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
ByteString
"DBParameterGroupName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
dbParameterGroupName,
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
]