module Network.AWS.ElasticBeanstalk.UpdateConfigurationTemplate
(
UpdateConfigurationTemplate
, updateConfigurationTemplate
, uctApplicationName
, uctDescription
, uctOptionSettings
, uctOptionsToRemove
, uctTemplateName
, UpdateConfigurationTemplateResponse
, updateConfigurationTemplateResponse
, uctrApplicationName
, uctrDateCreated
, uctrDateUpdated
, uctrDeploymentStatus
, uctrDescription
, uctrEnvironmentName
, uctrOptionSettings
, uctrSolutionStackName
, uctrTemplateName
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.ElasticBeanstalk.Types
import qualified GHC.Exts
data UpdateConfigurationTemplate = UpdateConfigurationTemplate
{ _uctApplicationName :: Text
, _uctDescription :: Maybe Text
, _uctOptionSettings :: List "member" ConfigurationOptionSetting
, _uctOptionsToRemove :: List "member" OptionSpecification
, _uctTemplateName :: Text
} deriving (Eq, Show)
updateConfigurationTemplate :: Text
-> Text
-> UpdateConfigurationTemplate
updateConfigurationTemplate p1 p2 = UpdateConfigurationTemplate
{ _uctApplicationName = p1
, _uctTemplateName = p2
, _uctDescription = Nothing
, _uctOptionSettings = mempty
, _uctOptionsToRemove = mempty
}
uctApplicationName :: Lens' UpdateConfigurationTemplate Text
uctApplicationName =
lens _uctApplicationName (\s a -> s { _uctApplicationName = a })
uctDescription :: Lens' UpdateConfigurationTemplate (Maybe Text)
uctDescription = lens _uctDescription (\s a -> s { _uctDescription = a })
uctOptionSettings :: Lens' UpdateConfigurationTemplate [ConfigurationOptionSetting]
uctOptionSettings =
lens _uctOptionSettings (\s a -> s { _uctOptionSettings = a })
. _List
uctOptionsToRemove :: Lens' UpdateConfigurationTemplate [OptionSpecification]
uctOptionsToRemove =
lens _uctOptionsToRemove (\s a -> s { _uctOptionsToRemove = a })
. _List
uctTemplateName :: Lens' UpdateConfigurationTemplate Text
uctTemplateName = lens _uctTemplateName (\s a -> s { _uctTemplateName = a })
data UpdateConfigurationTemplateResponse = UpdateConfigurationTemplateResponse
{ _uctrApplicationName :: Maybe Text
, _uctrDateCreated :: Maybe ISO8601
, _uctrDateUpdated :: Maybe ISO8601
, _uctrDeploymentStatus :: Maybe ConfigurationDeploymentStatus
, _uctrDescription :: Maybe Text
, _uctrEnvironmentName :: Maybe Text
, _uctrOptionSettings :: List "member" ConfigurationOptionSetting
, _uctrSolutionStackName :: Maybe Text
, _uctrTemplateName :: Maybe Text
} deriving (Eq, Show)
updateConfigurationTemplateResponse :: UpdateConfigurationTemplateResponse
updateConfigurationTemplateResponse = UpdateConfigurationTemplateResponse
{ _uctrSolutionStackName = Nothing
, _uctrApplicationName = Nothing
, _uctrTemplateName = Nothing
, _uctrDescription = Nothing
, _uctrEnvironmentName = Nothing
, _uctrDeploymentStatus = Nothing
, _uctrDateCreated = Nothing
, _uctrDateUpdated = Nothing
, _uctrOptionSettings = mempty
}
uctrApplicationName :: Lens' UpdateConfigurationTemplateResponse (Maybe Text)
uctrApplicationName =
lens _uctrApplicationName (\s a -> s { _uctrApplicationName = a })
uctrDateCreated :: Lens' UpdateConfigurationTemplateResponse (Maybe UTCTime)
uctrDateCreated = lens _uctrDateCreated (\s a -> s { _uctrDateCreated = a }) . mapping _Time
uctrDateUpdated :: Lens' UpdateConfigurationTemplateResponse (Maybe UTCTime)
uctrDateUpdated = lens _uctrDateUpdated (\s a -> s { _uctrDateUpdated = a }) . mapping _Time
uctrDeploymentStatus :: Lens' UpdateConfigurationTemplateResponse (Maybe ConfigurationDeploymentStatus)
uctrDeploymentStatus =
lens _uctrDeploymentStatus (\s a -> s { _uctrDeploymentStatus = a })
uctrDescription :: Lens' UpdateConfigurationTemplateResponse (Maybe Text)
uctrDescription = lens _uctrDescription (\s a -> s { _uctrDescription = a })
uctrEnvironmentName :: Lens' UpdateConfigurationTemplateResponse (Maybe Text)
uctrEnvironmentName =
lens _uctrEnvironmentName (\s a -> s { _uctrEnvironmentName = a })
uctrOptionSettings :: Lens' UpdateConfigurationTemplateResponse [ConfigurationOptionSetting]
uctrOptionSettings =
lens _uctrOptionSettings (\s a -> s { _uctrOptionSettings = a })
. _List
uctrSolutionStackName :: Lens' UpdateConfigurationTemplateResponse (Maybe Text)
uctrSolutionStackName =
lens _uctrSolutionStackName (\s a -> s { _uctrSolutionStackName = a })
uctrTemplateName :: Lens' UpdateConfigurationTemplateResponse (Maybe Text)
uctrTemplateName = lens _uctrTemplateName (\s a -> s { _uctrTemplateName = a })
instance ToPath UpdateConfigurationTemplate where
toPath = const "/"
instance ToQuery UpdateConfigurationTemplate where
toQuery UpdateConfigurationTemplate{..} = mconcat
[ "ApplicationName" =? _uctApplicationName
, "Description" =? _uctDescription
, "OptionSettings" =? _uctOptionSettings
, "OptionsToRemove" =? _uctOptionsToRemove
, "TemplateName" =? _uctTemplateName
]
instance ToHeaders UpdateConfigurationTemplate
instance AWSRequest UpdateConfigurationTemplate where
type Sv UpdateConfigurationTemplate = ElasticBeanstalk
type Rs UpdateConfigurationTemplate = UpdateConfigurationTemplateResponse
request = post "UpdateConfigurationTemplate"
response = xmlResponse
instance FromXML UpdateConfigurationTemplateResponse where
parseXML = withElement "UpdateConfigurationTemplateResult" $ \x -> UpdateConfigurationTemplateResponse
<$> x .@? "ApplicationName"
<*> x .@? "DateCreated"
<*> x .@? "DateUpdated"
<*> x .@? "DeploymentStatus"
<*> x .@? "Description"
<*> x .@? "EnvironmentName"
<*> x .@? "OptionSettings" .!@ mempty
<*> x .@? "SolutionStackName"
<*> x .@? "TemplateName"