{-# 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.Redshift.ModifyClusterParameterGroup
(
ModifyClusterParameterGroup (..),
newModifyClusterParameterGroup,
modifyClusterParameterGroup_parameterGroupName,
modifyClusterParameterGroup_parameters,
ClusterParameterGroupNameMessage (..),
newClusterParameterGroupNameMessage,
clusterParameterGroupNameMessage_parameterGroupName,
clusterParameterGroupNameMessage_parameterGroupStatus,
)
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.Redshift.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ModifyClusterParameterGroup = ModifyClusterParameterGroup'
{
ModifyClusterParameterGroup -> Text
parameterGroupName :: Prelude.Text,
ModifyClusterParameterGroup -> [Parameter]
parameters :: [Parameter]
}
deriving (ModifyClusterParameterGroup -> ModifyClusterParameterGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyClusterParameterGroup -> ModifyClusterParameterGroup -> Bool
$c/= :: ModifyClusterParameterGroup -> ModifyClusterParameterGroup -> Bool
== :: ModifyClusterParameterGroup -> ModifyClusterParameterGroup -> Bool
$c== :: ModifyClusterParameterGroup -> ModifyClusterParameterGroup -> Bool
Prelude.Eq, ReadPrec [ModifyClusterParameterGroup]
ReadPrec ModifyClusterParameterGroup
Int -> ReadS ModifyClusterParameterGroup
ReadS [ModifyClusterParameterGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyClusterParameterGroup]
$creadListPrec :: ReadPrec [ModifyClusterParameterGroup]
readPrec :: ReadPrec ModifyClusterParameterGroup
$creadPrec :: ReadPrec ModifyClusterParameterGroup
readList :: ReadS [ModifyClusterParameterGroup]
$creadList :: ReadS [ModifyClusterParameterGroup]
readsPrec :: Int -> ReadS ModifyClusterParameterGroup
$creadsPrec :: Int -> ReadS ModifyClusterParameterGroup
Prelude.Read, Int -> ModifyClusterParameterGroup -> ShowS
[ModifyClusterParameterGroup] -> ShowS
ModifyClusterParameterGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyClusterParameterGroup] -> ShowS
$cshowList :: [ModifyClusterParameterGroup] -> ShowS
show :: ModifyClusterParameterGroup -> String
$cshow :: ModifyClusterParameterGroup -> String
showsPrec :: Int -> ModifyClusterParameterGroup -> ShowS
$cshowsPrec :: Int -> ModifyClusterParameterGroup -> ShowS
Prelude.Show, forall x.
Rep ModifyClusterParameterGroup x -> ModifyClusterParameterGroup
forall x.
ModifyClusterParameterGroup -> Rep ModifyClusterParameterGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModifyClusterParameterGroup x -> ModifyClusterParameterGroup
$cfrom :: forall x.
ModifyClusterParameterGroup -> Rep ModifyClusterParameterGroup x
Prelude.Generic)
newModifyClusterParameterGroup ::
Prelude.Text ->
ModifyClusterParameterGroup
newModifyClusterParameterGroup :: Text -> ModifyClusterParameterGroup
newModifyClusterParameterGroup Text
pParameterGroupName_ =
ModifyClusterParameterGroup'
{ $sel:parameterGroupName:ModifyClusterParameterGroup' :: Text
parameterGroupName =
Text
pParameterGroupName_,
$sel:parameters:ModifyClusterParameterGroup' :: [Parameter]
parameters = forall a. Monoid a => a
Prelude.mempty
}
modifyClusterParameterGroup_parameterGroupName :: Lens.Lens' ModifyClusterParameterGroup Prelude.Text
modifyClusterParameterGroup_parameterGroupName :: Lens' ModifyClusterParameterGroup Text
modifyClusterParameterGroup_parameterGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyClusterParameterGroup' {Text
parameterGroupName :: Text
$sel:parameterGroupName:ModifyClusterParameterGroup' :: ModifyClusterParameterGroup -> Text
parameterGroupName} -> Text
parameterGroupName) (\s :: ModifyClusterParameterGroup
s@ModifyClusterParameterGroup' {} Text
a -> ModifyClusterParameterGroup
s {$sel:parameterGroupName:ModifyClusterParameterGroup' :: Text
parameterGroupName = Text
a} :: ModifyClusterParameterGroup)
modifyClusterParameterGroup_parameters :: Lens.Lens' ModifyClusterParameterGroup [Parameter]
modifyClusterParameterGroup_parameters :: Lens' ModifyClusterParameterGroup [Parameter]
modifyClusterParameterGroup_parameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyClusterParameterGroup' {[Parameter]
parameters :: [Parameter]
$sel:parameters:ModifyClusterParameterGroup' :: ModifyClusterParameterGroup -> [Parameter]
parameters} -> [Parameter]
parameters) (\s :: ModifyClusterParameterGroup
s@ModifyClusterParameterGroup' {} [Parameter]
a -> ModifyClusterParameterGroup
s {$sel:parameters:ModifyClusterParameterGroup' :: [Parameter]
parameters = [Parameter]
a} :: ModifyClusterParameterGroup) 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 ModifyClusterParameterGroup where
type
AWSResponse ModifyClusterParameterGroup =
ClusterParameterGroupNameMessage
request :: (Service -> Service)
-> ModifyClusterParameterGroup
-> Request ModifyClusterParameterGroup
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 ModifyClusterParameterGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ModifyClusterParameterGroup)))
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
"ModifyClusterParameterGroupResult"
(\Int
s ResponseHeaders
h [Node]
x -> forall a. FromXML a => [Node] -> Either String a
Data.parseXML [Node]
x)
instance Prelude.Hashable ModifyClusterParameterGroup where
hashWithSalt :: Int -> ModifyClusterParameterGroup -> Int
hashWithSalt Int
_salt ModifyClusterParameterGroup' {[Parameter]
Text
parameters :: [Parameter]
parameterGroupName :: Text
$sel:parameters:ModifyClusterParameterGroup' :: ModifyClusterParameterGroup -> [Parameter]
$sel:parameterGroupName:ModifyClusterParameterGroup' :: ModifyClusterParameterGroup -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
parameterGroupName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Parameter]
parameters
instance Prelude.NFData ModifyClusterParameterGroup where
rnf :: ModifyClusterParameterGroup -> ()
rnf ModifyClusterParameterGroup' {[Parameter]
Text
parameters :: [Parameter]
parameterGroupName :: Text
$sel:parameters:ModifyClusterParameterGroup' :: ModifyClusterParameterGroup -> [Parameter]
$sel:parameterGroupName:ModifyClusterParameterGroup' :: ModifyClusterParameterGroup -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
parameterGroupName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Parameter]
parameters
instance Data.ToHeaders ModifyClusterParameterGroup where
toHeaders :: ModifyClusterParameterGroup -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath ModifyClusterParameterGroup where
toPath :: ModifyClusterParameterGroup -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery ModifyClusterParameterGroup where
toQuery :: ModifyClusterParameterGroup -> QueryString
toQuery ModifyClusterParameterGroup' {[Parameter]
Text
parameters :: [Parameter]
parameterGroupName :: Text
$sel:parameters:ModifyClusterParameterGroup' :: ModifyClusterParameterGroup -> [Parameter]
$sel:parameterGroupName:ModifyClusterParameterGroup' :: ModifyClusterParameterGroup -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"ModifyClusterParameterGroup" ::
Prelude.ByteString
),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
ByteString
"ParameterGroupName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
parameterGroupName,
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
]