{-# 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.ElasticBeanstalk.UpdateConfigurationTemplate
(
UpdateConfigurationTemplate (..),
newUpdateConfigurationTemplate,
updateConfigurationTemplate_optionsToRemove,
updateConfigurationTemplate_optionSettings,
updateConfigurationTemplate_description,
updateConfigurationTemplate_applicationName,
updateConfigurationTemplate_templateName,
ConfigurationSettingsDescription (..),
newConfigurationSettingsDescription,
configurationSettingsDescription_templateName,
configurationSettingsDescription_optionSettings,
configurationSettingsDescription_dateUpdated,
configurationSettingsDescription_dateCreated,
configurationSettingsDescription_platformArn,
configurationSettingsDescription_environmentName,
configurationSettingsDescription_applicationName,
configurationSettingsDescription_deploymentStatus,
configurationSettingsDescription_solutionStackName,
configurationSettingsDescription_description,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ElasticBeanstalk.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 UpdateConfigurationTemplate = UpdateConfigurationTemplate'
{
UpdateConfigurationTemplate -> Maybe [OptionSpecification]
optionsToRemove :: Prelude.Maybe [OptionSpecification],
UpdateConfigurationTemplate -> Maybe [ConfigurationOptionSetting]
optionSettings :: Prelude.Maybe [ConfigurationOptionSetting],
UpdateConfigurationTemplate -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
UpdateConfigurationTemplate -> Text
applicationName :: Prelude.Text,
UpdateConfigurationTemplate -> Text
templateName :: Prelude.Text
}
deriving (UpdateConfigurationTemplate -> UpdateConfigurationTemplate -> Bool
(UpdateConfigurationTemplate
-> UpdateConfigurationTemplate -> Bool)
-> (UpdateConfigurationTemplate
-> UpdateConfigurationTemplate -> Bool)
-> Eq UpdateConfigurationTemplate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateConfigurationTemplate -> UpdateConfigurationTemplate -> Bool
$c/= :: UpdateConfigurationTemplate -> UpdateConfigurationTemplate -> Bool
== :: UpdateConfigurationTemplate -> UpdateConfigurationTemplate -> Bool
$c== :: UpdateConfigurationTemplate -> UpdateConfigurationTemplate -> Bool
Prelude.Eq, ReadPrec [UpdateConfigurationTemplate]
ReadPrec UpdateConfigurationTemplate
Int -> ReadS UpdateConfigurationTemplate
ReadS [UpdateConfigurationTemplate]
(Int -> ReadS UpdateConfigurationTemplate)
-> ReadS [UpdateConfigurationTemplate]
-> ReadPrec UpdateConfigurationTemplate
-> ReadPrec [UpdateConfigurationTemplate]
-> Read UpdateConfigurationTemplate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateConfigurationTemplate]
$creadListPrec :: ReadPrec [UpdateConfigurationTemplate]
readPrec :: ReadPrec UpdateConfigurationTemplate
$creadPrec :: ReadPrec UpdateConfigurationTemplate
readList :: ReadS [UpdateConfigurationTemplate]
$creadList :: ReadS [UpdateConfigurationTemplate]
readsPrec :: Int -> ReadS UpdateConfigurationTemplate
$creadsPrec :: Int -> ReadS UpdateConfigurationTemplate
Prelude.Read, Int -> UpdateConfigurationTemplate -> ShowS
[UpdateConfigurationTemplate] -> ShowS
UpdateConfigurationTemplate -> String
(Int -> UpdateConfigurationTemplate -> ShowS)
-> (UpdateConfigurationTemplate -> String)
-> ([UpdateConfigurationTemplate] -> ShowS)
-> Show UpdateConfigurationTemplate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateConfigurationTemplate] -> ShowS
$cshowList :: [UpdateConfigurationTemplate] -> ShowS
show :: UpdateConfigurationTemplate -> String
$cshow :: UpdateConfigurationTemplate -> String
showsPrec :: Int -> UpdateConfigurationTemplate -> ShowS
$cshowsPrec :: Int -> UpdateConfigurationTemplate -> ShowS
Prelude.Show, (forall x.
UpdateConfigurationTemplate -> Rep UpdateConfigurationTemplate x)
-> (forall x.
Rep UpdateConfigurationTemplate x -> UpdateConfigurationTemplate)
-> Generic UpdateConfigurationTemplate
forall x.
Rep UpdateConfigurationTemplate x -> UpdateConfigurationTemplate
forall x.
UpdateConfigurationTemplate -> Rep UpdateConfigurationTemplate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateConfigurationTemplate x -> UpdateConfigurationTemplate
$cfrom :: forall x.
UpdateConfigurationTemplate -> Rep UpdateConfigurationTemplate x
Prelude.Generic)
newUpdateConfigurationTemplate ::
Prelude.Text ->
Prelude.Text ->
UpdateConfigurationTemplate
newUpdateConfigurationTemplate :: Text -> Text -> UpdateConfigurationTemplate
newUpdateConfigurationTemplate
Text
pApplicationName_
Text
pTemplateName_ =
UpdateConfigurationTemplate' :: Maybe [OptionSpecification]
-> Maybe [ConfigurationOptionSetting]
-> Maybe Text
-> Text
-> Text
-> UpdateConfigurationTemplate
UpdateConfigurationTemplate'
{ $sel:optionsToRemove:UpdateConfigurationTemplate' :: Maybe [OptionSpecification]
optionsToRemove =
Maybe [OptionSpecification]
forall a. Maybe a
Prelude.Nothing,
$sel:optionSettings:UpdateConfigurationTemplate' :: Maybe [ConfigurationOptionSetting]
optionSettings = Maybe [ConfigurationOptionSetting]
forall a. Maybe a
Prelude.Nothing,
$sel:description:UpdateConfigurationTemplate' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:applicationName:UpdateConfigurationTemplate' :: Text
applicationName = Text
pApplicationName_,
$sel:templateName:UpdateConfigurationTemplate' :: Text
templateName = Text
pTemplateName_
}
updateConfigurationTemplate_optionsToRemove :: Lens.Lens' UpdateConfigurationTemplate (Prelude.Maybe [OptionSpecification])
updateConfigurationTemplate_optionsToRemove :: (Maybe [OptionSpecification] -> f (Maybe [OptionSpecification]))
-> UpdateConfigurationTemplate -> f UpdateConfigurationTemplate
updateConfigurationTemplate_optionsToRemove = (UpdateConfigurationTemplate -> Maybe [OptionSpecification])
-> (UpdateConfigurationTemplate
-> Maybe [OptionSpecification] -> UpdateConfigurationTemplate)
-> Lens
UpdateConfigurationTemplate
UpdateConfigurationTemplate
(Maybe [OptionSpecification])
(Maybe [OptionSpecification])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateConfigurationTemplate' {Maybe [OptionSpecification]
optionsToRemove :: Maybe [OptionSpecification]
$sel:optionsToRemove:UpdateConfigurationTemplate' :: UpdateConfigurationTemplate -> Maybe [OptionSpecification]
optionsToRemove} -> Maybe [OptionSpecification]
optionsToRemove) (\s :: UpdateConfigurationTemplate
s@UpdateConfigurationTemplate' {} Maybe [OptionSpecification]
a -> UpdateConfigurationTemplate
s {$sel:optionsToRemove:UpdateConfigurationTemplate' :: Maybe [OptionSpecification]
optionsToRemove = Maybe [OptionSpecification]
a} :: UpdateConfigurationTemplate) ((Maybe [OptionSpecification] -> f (Maybe [OptionSpecification]))
-> UpdateConfigurationTemplate -> f UpdateConfigurationTemplate)
-> ((Maybe [OptionSpecification]
-> f (Maybe [OptionSpecification]))
-> Maybe [OptionSpecification] -> f (Maybe [OptionSpecification]))
-> (Maybe [OptionSpecification] -> f (Maybe [OptionSpecification]))
-> UpdateConfigurationTemplate
-> f UpdateConfigurationTemplate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[OptionSpecification]
[OptionSpecification]
[OptionSpecification]
[OptionSpecification]
-> Iso
(Maybe [OptionSpecification])
(Maybe [OptionSpecification])
(Maybe [OptionSpecification])
(Maybe [OptionSpecification])
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
[OptionSpecification]
[OptionSpecification]
[OptionSpecification]
[OptionSpecification]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateConfigurationTemplate_optionSettings :: Lens.Lens' UpdateConfigurationTemplate (Prelude.Maybe [ConfigurationOptionSetting])
updateConfigurationTemplate_optionSettings :: (Maybe [ConfigurationOptionSetting]
-> f (Maybe [ConfigurationOptionSetting]))
-> UpdateConfigurationTemplate -> f UpdateConfigurationTemplate
updateConfigurationTemplate_optionSettings = (UpdateConfigurationTemplate -> Maybe [ConfigurationOptionSetting])
-> (UpdateConfigurationTemplate
-> Maybe [ConfigurationOptionSetting]
-> UpdateConfigurationTemplate)
-> Lens
UpdateConfigurationTemplate
UpdateConfigurationTemplate
(Maybe [ConfigurationOptionSetting])
(Maybe [ConfigurationOptionSetting])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateConfigurationTemplate' {Maybe [ConfigurationOptionSetting]
optionSettings :: Maybe [ConfigurationOptionSetting]
$sel:optionSettings:UpdateConfigurationTemplate' :: UpdateConfigurationTemplate -> Maybe [ConfigurationOptionSetting]
optionSettings} -> Maybe [ConfigurationOptionSetting]
optionSettings) (\s :: UpdateConfigurationTemplate
s@UpdateConfigurationTemplate' {} Maybe [ConfigurationOptionSetting]
a -> UpdateConfigurationTemplate
s {$sel:optionSettings:UpdateConfigurationTemplate' :: Maybe [ConfigurationOptionSetting]
optionSettings = Maybe [ConfigurationOptionSetting]
a} :: UpdateConfigurationTemplate) ((Maybe [ConfigurationOptionSetting]
-> f (Maybe [ConfigurationOptionSetting]))
-> UpdateConfigurationTemplate -> f UpdateConfigurationTemplate)
-> ((Maybe [ConfigurationOptionSetting]
-> f (Maybe [ConfigurationOptionSetting]))
-> Maybe [ConfigurationOptionSetting]
-> f (Maybe [ConfigurationOptionSetting]))
-> (Maybe [ConfigurationOptionSetting]
-> f (Maybe [ConfigurationOptionSetting]))
-> UpdateConfigurationTemplate
-> f UpdateConfigurationTemplate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ConfigurationOptionSetting]
[ConfigurationOptionSetting]
[ConfigurationOptionSetting]
[ConfigurationOptionSetting]
-> Iso
(Maybe [ConfigurationOptionSetting])
(Maybe [ConfigurationOptionSetting])
(Maybe [ConfigurationOptionSetting])
(Maybe [ConfigurationOptionSetting])
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
[ConfigurationOptionSetting]
[ConfigurationOptionSetting]
[ConfigurationOptionSetting]
[ConfigurationOptionSetting]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateConfigurationTemplate_description :: Lens.Lens' UpdateConfigurationTemplate (Prelude.Maybe Prelude.Text)
updateConfigurationTemplate_description :: (Maybe Text -> f (Maybe Text))
-> UpdateConfigurationTemplate -> f UpdateConfigurationTemplate
updateConfigurationTemplate_description = (UpdateConfigurationTemplate -> Maybe Text)
-> (UpdateConfigurationTemplate
-> Maybe Text -> UpdateConfigurationTemplate)
-> Lens
UpdateConfigurationTemplate
UpdateConfigurationTemplate
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateConfigurationTemplate' {Maybe Text
description :: Maybe Text
$sel:description:UpdateConfigurationTemplate' :: UpdateConfigurationTemplate -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateConfigurationTemplate
s@UpdateConfigurationTemplate' {} Maybe Text
a -> UpdateConfigurationTemplate
s {$sel:description:UpdateConfigurationTemplate' :: Maybe Text
description = Maybe Text
a} :: UpdateConfigurationTemplate)
updateConfigurationTemplate_applicationName :: Lens.Lens' UpdateConfigurationTemplate Prelude.Text
updateConfigurationTemplate_applicationName :: (Text -> f Text)
-> UpdateConfigurationTemplate -> f UpdateConfigurationTemplate
updateConfigurationTemplate_applicationName = (UpdateConfigurationTemplate -> Text)
-> (UpdateConfigurationTemplate
-> Text -> UpdateConfigurationTemplate)
-> Lens
UpdateConfigurationTemplate UpdateConfigurationTemplate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateConfigurationTemplate' {Text
applicationName :: Text
$sel:applicationName:UpdateConfigurationTemplate' :: UpdateConfigurationTemplate -> Text
applicationName} -> Text
applicationName) (\s :: UpdateConfigurationTemplate
s@UpdateConfigurationTemplate' {} Text
a -> UpdateConfigurationTemplate
s {$sel:applicationName:UpdateConfigurationTemplate' :: Text
applicationName = Text
a} :: UpdateConfigurationTemplate)
updateConfigurationTemplate_templateName :: Lens.Lens' UpdateConfigurationTemplate Prelude.Text
updateConfigurationTemplate_templateName :: (Text -> f Text)
-> UpdateConfigurationTemplate -> f UpdateConfigurationTemplate
updateConfigurationTemplate_templateName = (UpdateConfigurationTemplate -> Text)
-> (UpdateConfigurationTemplate
-> Text -> UpdateConfigurationTemplate)
-> Lens
UpdateConfigurationTemplate UpdateConfigurationTemplate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateConfigurationTemplate' {Text
templateName :: Text
$sel:templateName:UpdateConfigurationTemplate' :: UpdateConfigurationTemplate -> Text
templateName} -> Text
templateName) (\s :: UpdateConfigurationTemplate
s@UpdateConfigurationTemplate' {} Text
a -> UpdateConfigurationTemplate
s {$sel:templateName:UpdateConfigurationTemplate' :: Text
templateName = Text
a} :: UpdateConfigurationTemplate)
instance Core.AWSRequest UpdateConfigurationTemplate where
type
AWSResponse UpdateConfigurationTemplate =
ConfigurationSettingsDescription
request :: UpdateConfigurationTemplate -> Request UpdateConfigurationTemplate
request = Service
-> UpdateConfigurationTemplate
-> Request UpdateConfigurationTemplate
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateConfigurationTemplate
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateConfigurationTemplate)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse UpdateConfigurationTemplate))
-> Logger
-> Service
-> Proxy UpdateConfigurationTemplate
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateConfigurationTemplate)))
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
"UpdateConfigurationTemplateResult"
(\Int
s ResponseHeaders
h [Node]
x -> [Node] -> Either String ConfigurationSettingsDescription
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
instance Prelude.Hashable UpdateConfigurationTemplate
instance Prelude.NFData UpdateConfigurationTemplate
instance Core.ToHeaders UpdateConfigurationTemplate where
toHeaders :: UpdateConfigurationTemplate -> ResponseHeaders
toHeaders = ResponseHeaders -> UpdateConfigurationTemplate -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath UpdateConfigurationTemplate where
toPath :: UpdateConfigurationTemplate -> ByteString
toPath = ByteString -> UpdateConfigurationTemplate -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UpdateConfigurationTemplate where
toQuery :: UpdateConfigurationTemplate -> QueryString
toQuery UpdateConfigurationTemplate' {Maybe [ConfigurationOptionSetting]
Maybe [OptionSpecification]
Maybe Text
Text
templateName :: Text
applicationName :: Text
description :: Maybe Text
optionSettings :: Maybe [ConfigurationOptionSetting]
optionsToRemove :: Maybe [OptionSpecification]
$sel:templateName:UpdateConfigurationTemplate' :: UpdateConfigurationTemplate -> Text
$sel:applicationName:UpdateConfigurationTemplate' :: UpdateConfigurationTemplate -> Text
$sel:description:UpdateConfigurationTemplate' :: UpdateConfigurationTemplate -> Maybe Text
$sel:optionSettings:UpdateConfigurationTemplate' :: UpdateConfigurationTemplate -> Maybe [ConfigurationOptionSetting]
$sel:optionsToRemove:UpdateConfigurationTemplate' :: UpdateConfigurationTemplate -> Maybe [OptionSpecification]
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"UpdateConfigurationTemplate" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
ByteString
"OptionsToRemove"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString -> [OptionSpecification] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
([OptionSpecification] -> QueryString)
-> Maybe [OptionSpecification] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [OptionSpecification]
optionsToRemove
),
ByteString
"OptionSettings"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString -> [ConfigurationOptionSetting] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
([ConfigurationOptionSetting] -> QueryString)
-> Maybe [ConfigurationOptionSetting] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ConfigurationOptionSetting]
optionSettings
),
ByteString
"Description" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
description,
ByteString
"ApplicationName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
applicationName,
ByteString
"TemplateName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
templateName
]