{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.ElasticBeanstalk.UpdateEnvironment
(
updateEnvironment
, UpdateEnvironment
, ueTemplateName
, ueOptionsToRemove
, ueOptionSettings
, ueVersionLabel
, ueTier
, ueEnvironmentName
, ueApplicationName
, ueSolutionStackName
, ueEnvironmentId
, ueGroupName
, ueDescription
, environmentDescription
, EnvironmentDescription
, eStatus
, eCNAME
, eTemplateName
, eAbortableOperationInProgress
, eEndpointURL
, eResources
, eDateUpdated
, eDateCreated
, eHealth
, eVersionLabel
, eTier
, eEnvironmentName
, eApplicationName
, eSolutionStackName
, eEnvironmentId
, eHealthStatus
, eEnvironmentLinks
, eDescription
) where
import Network.AWS.ElasticBeanstalk.Types
import Network.AWS.ElasticBeanstalk.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data UpdateEnvironment = UpdateEnvironment'
{ _ueTemplateName :: !(Maybe Text)
, _ueOptionsToRemove :: !(Maybe [OptionSpecification])
, _ueOptionSettings :: !(Maybe [ConfigurationOptionSetting])
, _ueVersionLabel :: !(Maybe Text)
, _ueTier :: !(Maybe EnvironmentTier)
, _ueEnvironmentName :: !(Maybe Text)
, _ueApplicationName :: !(Maybe Text)
, _ueSolutionStackName :: !(Maybe Text)
, _ueEnvironmentId :: !(Maybe Text)
, _ueGroupName :: !(Maybe Text)
, _ueDescription :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
updateEnvironment
:: UpdateEnvironment
updateEnvironment =
UpdateEnvironment'
{ _ueTemplateName = Nothing
, _ueOptionsToRemove = Nothing
, _ueOptionSettings = Nothing
, _ueVersionLabel = Nothing
, _ueTier = Nothing
, _ueEnvironmentName = Nothing
, _ueApplicationName = Nothing
, _ueSolutionStackName = Nothing
, _ueEnvironmentId = Nothing
, _ueGroupName = Nothing
, _ueDescription = Nothing
}
ueTemplateName :: Lens' UpdateEnvironment (Maybe Text)
ueTemplateName = lens _ueTemplateName (\ s a -> s{_ueTemplateName = a});
ueOptionsToRemove :: Lens' UpdateEnvironment [OptionSpecification]
ueOptionsToRemove = lens _ueOptionsToRemove (\ s a -> s{_ueOptionsToRemove = a}) . _Default . _Coerce;
ueOptionSettings :: Lens' UpdateEnvironment [ConfigurationOptionSetting]
ueOptionSettings = lens _ueOptionSettings (\ s a -> s{_ueOptionSettings = a}) . _Default . _Coerce;
ueVersionLabel :: Lens' UpdateEnvironment (Maybe Text)
ueVersionLabel = lens _ueVersionLabel (\ s a -> s{_ueVersionLabel = a});
ueTier :: Lens' UpdateEnvironment (Maybe EnvironmentTier)
ueTier = lens _ueTier (\ s a -> s{_ueTier = a});
ueEnvironmentName :: Lens' UpdateEnvironment (Maybe Text)
ueEnvironmentName = lens _ueEnvironmentName (\ s a -> s{_ueEnvironmentName = a});
ueApplicationName :: Lens' UpdateEnvironment (Maybe Text)
ueApplicationName = lens _ueApplicationName (\ s a -> s{_ueApplicationName = a});
ueSolutionStackName :: Lens' UpdateEnvironment (Maybe Text)
ueSolutionStackName = lens _ueSolutionStackName (\ s a -> s{_ueSolutionStackName = a});
ueEnvironmentId :: Lens' UpdateEnvironment (Maybe Text)
ueEnvironmentId = lens _ueEnvironmentId (\ s a -> s{_ueEnvironmentId = a});
ueGroupName :: Lens' UpdateEnvironment (Maybe Text)
ueGroupName = lens _ueGroupName (\ s a -> s{_ueGroupName = a});
ueDescription :: Lens' UpdateEnvironment (Maybe Text)
ueDescription = lens _ueDescription (\ s a -> s{_ueDescription = a});
instance AWSRequest UpdateEnvironment where
type Rs UpdateEnvironment = EnvironmentDescription
request = postQuery elasticBeanstalk
response
= receiveXMLWrapper "UpdateEnvironmentResult"
(\ s h x -> parseXML x)
instance Hashable UpdateEnvironment
instance NFData UpdateEnvironment
instance ToHeaders UpdateEnvironment where
toHeaders = const mempty
instance ToPath UpdateEnvironment where
toPath = const "/"
instance ToQuery UpdateEnvironment where
toQuery UpdateEnvironment'{..}
= mconcat
["Action" =: ("UpdateEnvironment" :: ByteString),
"Version" =: ("2010-12-01" :: ByteString),
"TemplateName" =: _ueTemplateName,
"OptionsToRemove" =:
toQuery
(toQueryList "member" <$> _ueOptionsToRemove),
"OptionSettings" =:
toQuery (toQueryList "member" <$> _ueOptionSettings),
"VersionLabel" =: _ueVersionLabel, "Tier" =: _ueTier,
"EnvironmentName" =: _ueEnvironmentName,
"ApplicationName" =: _ueApplicationName,
"SolutionStackName" =: _ueSolutionStackName,
"EnvironmentId" =: _ueEnvironmentId,
"GroupName" =: _ueGroupName,
"Description" =: _ueDescription]