{-# 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_parameterGroupStatus,
clusterParameterGroupNameMessage_parameterGroupName,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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
(ModifyClusterParameterGroup
-> ModifyClusterParameterGroup -> Bool)
-> (ModifyClusterParameterGroup
-> ModifyClusterParameterGroup -> Bool)
-> Eq ModifyClusterParameterGroup
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]
(Int -> ReadS ModifyClusterParameterGroup)
-> ReadS [ModifyClusterParameterGroup]
-> ReadPrec ModifyClusterParameterGroup
-> ReadPrec [ModifyClusterParameterGroup]
-> Read 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
(Int -> ModifyClusterParameterGroup -> ShowS)
-> (ModifyClusterParameterGroup -> String)
-> ([ModifyClusterParameterGroup] -> ShowS)
-> Show ModifyClusterParameterGroup
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.
ModifyClusterParameterGroup -> Rep ModifyClusterParameterGroup x)
-> (forall x.
Rep ModifyClusterParameterGroup x -> ModifyClusterParameterGroup)
-> Generic ModifyClusterParameterGroup
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' :: Text -> [Parameter] -> ModifyClusterParameterGroup
ModifyClusterParameterGroup'
{ $sel:parameterGroupName:ModifyClusterParameterGroup' :: Text
parameterGroupName =
Text
pParameterGroupName_,
$sel:parameters:ModifyClusterParameterGroup' :: [Parameter]
parameters = [Parameter]
forall a. Monoid a => a
Prelude.mempty
}
modifyClusterParameterGroup_parameterGroupName :: Lens.Lens' ModifyClusterParameterGroup Prelude.Text
modifyClusterParameterGroup_parameterGroupName :: (Text -> f Text)
-> ModifyClusterParameterGroup -> f ModifyClusterParameterGroup
modifyClusterParameterGroup_parameterGroupName = (ModifyClusterParameterGroup -> Text)
-> (ModifyClusterParameterGroup
-> Text -> ModifyClusterParameterGroup)
-> Lens
ModifyClusterParameterGroup ModifyClusterParameterGroup Text Text
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 :: ([Parameter] -> f [Parameter])
-> ModifyClusterParameterGroup -> f ModifyClusterParameterGroup
modifyClusterParameterGroup_parameters = (ModifyClusterParameterGroup -> [Parameter])
-> (ModifyClusterParameterGroup
-> [Parameter] -> ModifyClusterParameterGroup)
-> Lens
ModifyClusterParameterGroup
ModifyClusterParameterGroup
[Parameter]
[Parameter]
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) (([Parameter] -> f [Parameter])
-> ModifyClusterParameterGroup -> f ModifyClusterParameterGroup)
-> (([Parameter] -> f [Parameter]) -> [Parameter] -> f [Parameter])
-> ([Parameter] -> f [Parameter])
-> ModifyClusterParameterGroup
-> f ModifyClusterParameterGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Parameter] -> f [Parameter]) -> [Parameter] -> f [Parameter]
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 :: ModifyClusterParameterGroup -> Request ModifyClusterParameterGroup
request = Service
-> ModifyClusterParameterGroup
-> Request ModifyClusterParameterGroup
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy ModifyClusterParameterGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ModifyClusterParameterGroup)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse ModifyClusterParameterGroup))
-> Logger
-> Service
-> Proxy ModifyClusterParameterGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ModifyClusterParameterGroup)))
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
"ModifyClusterParameterGroupResult"
(\Int
s ResponseHeaders
h [Node]
x -> [Node] -> Either String ClusterParameterGroupNameMessage
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
instance Prelude.Hashable ModifyClusterParameterGroup
instance Prelude.NFData ModifyClusterParameterGroup
instance Core.ToHeaders ModifyClusterParameterGroup where
toHeaders :: ModifyClusterParameterGroup -> ResponseHeaders
toHeaders = ResponseHeaders -> ModifyClusterParameterGroup -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath ModifyClusterParameterGroup where
toPath :: ModifyClusterParameterGroup -> ByteString
toPath = ByteString -> ModifyClusterParameterGroup -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ModifyClusterParameterGroup where
toQuery :: ModifyClusterParameterGroup -> QueryString
toQuery ModifyClusterParameterGroup' {[Parameter]
Text
parameters :: [Parameter]
parameterGroupName :: Text
$sel:parameters:ModifyClusterParameterGroup' :: ModifyClusterParameterGroup -> [Parameter]
$sel:parameterGroupName:ModifyClusterParameterGroup' :: ModifyClusterParameterGroup -> 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
"ModifyClusterParameterGroup" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
ByteString
"ParameterGroupName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
parameterGroupName,
ByteString
"Parameters"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ByteString -> [Parameter] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"Parameter" [Parameter]
parameters
]