module Network.AWS.OpsWorks.UpdateApp
(
UpdateApp
, updateApp
, uaAppId
, uaAppSource
, uaAttributes
, uaDataSources
, uaDescription
, uaDomains
, uaEnableSsl
, uaEnvironment
, uaName
, uaSslConfiguration
, uaType
, UpdateAppResponse
, updateAppResponse
) where
import Network.AWS.Prelude
import Network.AWS.Request.JSON
import Network.AWS.OpsWorks.Types
import qualified GHC.Exts
data UpdateApp = UpdateApp
{ _uaAppId :: Text
, _uaAppSource :: Maybe Source
, _uaAttributes :: Map AppAttributesKeys Text
, _uaDataSources :: List "DataSources" DataSource
, _uaDescription :: Maybe Text
, _uaDomains :: List "Domains" Text
, _uaEnableSsl :: Maybe Bool
, _uaEnvironment :: List "Environment" EnvironmentVariable
, _uaName :: Maybe Text
, _uaSslConfiguration :: Maybe SslConfiguration
, _uaType :: Maybe AppType
} deriving (Eq, Read, Show)
updateApp :: Text
-> UpdateApp
updateApp p1 = UpdateApp
{ _uaAppId = p1
, _uaName = Nothing
, _uaDescription = Nothing
, _uaDataSources = mempty
, _uaType = Nothing
, _uaAppSource = Nothing
, _uaDomains = mempty
, _uaEnableSsl = Nothing
, _uaSslConfiguration = Nothing
, _uaAttributes = mempty
, _uaEnvironment = mempty
}
uaAppId :: Lens' UpdateApp Text
uaAppId = lens _uaAppId (\s a -> s { _uaAppId = a })
uaAppSource :: Lens' UpdateApp (Maybe Source)
uaAppSource = lens _uaAppSource (\s a -> s { _uaAppSource = a })
uaAttributes :: Lens' UpdateApp (HashMap AppAttributesKeys Text)
uaAttributes = lens _uaAttributes (\s a -> s { _uaAttributes = a }) . _Map
uaDataSources :: Lens' UpdateApp [DataSource]
uaDataSources = lens _uaDataSources (\s a -> s { _uaDataSources = a }) . _List
uaDescription :: Lens' UpdateApp (Maybe Text)
uaDescription = lens _uaDescription (\s a -> s { _uaDescription = a })
uaDomains :: Lens' UpdateApp [Text]
uaDomains = lens _uaDomains (\s a -> s { _uaDomains = a }) . _List
uaEnableSsl :: Lens' UpdateApp (Maybe Bool)
uaEnableSsl = lens _uaEnableSsl (\s a -> s { _uaEnableSsl = a })
uaEnvironment :: Lens' UpdateApp [EnvironmentVariable]
uaEnvironment = lens _uaEnvironment (\s a -> s { _uaEnvironment = a }) . _List
uaName :: Lens' UpdateApp (Maybe Text)
uaName = lens _uaName (\s a -> s { _uaName = a })
uaSslConfiguration :: Lens' UpdateApp (Maybe SslConfiguration)
uaSslConfiguration =
lens _uaSslConfiguration (\s a -> s { _uaSslConfiguration = a })
uaType :: Lens' UpdateApp (Maybe AppType)
uaType = lens _uaType (\s a -> s { _uaType = a })
data UpdateAppResponse = UpdateAppResponse
deriving (Eq, Ord, Read, Show, Generic)
updateAppResponse :: UpdateAppResponse
updateAppResponse = UpdateAppResponse
instance ToPath UpdateApp where
toPath = const "/"
instance ToQuery UpdateApp where
toQuery = const mempty
instance ToHeaders UpdateApp
instance ToJSON UpdateApp where
toJSON UpdateApp{..} = object
[ "AppId" .= _uaAppId
, "Name" .= _uaName
, "Description" .= _uaDescription
, "DataSources" .= _uaDataSources
, "Type" .= _uaType
, "AppSource" .= _uaAppSource
, "Domains" .= _uaDomains
, "EnableSsl" .= _uaEnableSsl
, "SslConfiguration" .= _uaSslConfiguration
, "Attributes" .= _uaAttributes
, "Environment" .= _uaEnvironment
]
instance AWSRequest UpdateApp where
type Sv UpdateApp = OpsWorks
type Rs UpdateApp = UpdateAppResponse
request = post "UpdateApp"
response = nullResponse UpdateAppResponse