{-# 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.UpdateApplication
(
updateApplication
, UpdateApplication
, uaDescription
, uaApplicationName
, applicationDescriptionMessage
, ApplicationDescriptionMessage
, admApplication
) 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 UpdateApplication = UpdateApplication'
{ _uaDescription :: !(Maybe Text)
, _uaApplicationName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateApplication
:: Text
-> UpdateApplication
updateApplication pApplicationName_ =
UpdateApplication'
{_uaDescription = Nothing, _uaApplicationName = pApplicationName_}
uaDescription :: Lens' UpdateApplication (Maybe Text)
uaDescription = lens _uaDescription (\ s a -> s{_uaDescription = a})
uaApplicationName :: Lens' UpdateApplication Text
uaApplicationName = lens _uaApplicationName (\ s a -> s{_uaApplicationName = a})
instance AWSRequest UpdateApplication where
type Rs UpdateApplication =
ApplicationDescriptionMessage
request = postQuery elasticBeanstalk
response
= receiveXMLWrapper "UpdateApplicationResult"
(\ s h x -> parseXML x)
instance Hashable UpdateApplication where
instance NFData UpdateApplication where
instance ToHeaders UpdateApplication where
toHeaders = const mempty
instance ToPath UpdateApplication where
toPath = const "/"
instance ToQuery UpdateApplication where
toQuery UpdateApplication'{..}
= mconcat
["Action" =: ("UpdateApplication" :: ByteString),
"Version" =: ("2010-12-01" :: ByteString),
"Description" =: _uaDescription,
"ApplicationName" =: _uaApplicationName]