{-# 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.ApplyEnvironmentManagedAction
(
applyEnvironmentManagedAction
, ApplyEnvironmentManagedAction
, aemaEnvironmentName
, aemaEnvironmentId
, aemaActionId
, applyEnvironmentManagedActionResponse
, ApplyEnvironmentManagedActionResponse
, aemarsStatus
, aemarsActionId
, aemarsActionDescription
, aemarsActionType
, aemarsResponseStatus
) 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 ApplyEnvironmentManagedAction = ApplyEnvironmentManagedAction'
{ _aemaEnvironmentName :: !(Maybe Text)
, _aemaEnvironmentId :: !(Maybe Text)
, _aemaActionId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
applyEnvironmentManagedAction
:: Text
-> ApplyEnvironmentManagedAction
applyEnvironmentManagedAction pActionId_ =
ApplyEnvironmentManagedAction'
{ _aemaEnvironmentName = Nothing
, _aemaEnvironmentId = Nothing
, _aemaActionId = pActionId_
}
aemaEnvironmentName :: Lens' ApplyEnvironmentManagedAction (Maybe Text)
aemaEnvironmentName = lens _aemaEnvironmentName (\ s a -> s{_aemaEnvironmentName = a});
aemaEnvironmentId :: Lens' ApplyEnvironmentManagedAction (Maybe Text)
aemaEnvironmentId = lens _aemaEnvironmentId (\ s a -> s{_aemaEnvironmentId = a});
aemaActionId :: Lens' ApplyEnvironmentManagedAction Text
aemaActionId = lens _aemaActionId (\ s a -> s{_aemaActionId = a});
instance AWSRequest ApplyEnvironmentManagedAction
where
type Rs ApplyEnvironmentManagedAction =
ApplyEnvironmentManagedActionResponse
request = postQuery elasticBeanstalk
response
= receiveXMLWrapper
"ApplyEnvironmentManagedActionResult"
(\ s h x ->
ApplyEnvironmentManagedActionResponse' <$>
(x .@? "Status") <*> (x .@? "ActionId") <*>
(x .@? "ActionDescription")
<*> (x .@? "ActionType")
<*> (pure (fromEnum s)))
instance Hashable ApplyEnvironmentManagedAction
instance NFData ApplyEnvironmentManagedAction
instance ToHeaders ApplyEnvironmentManagedAction
where
toHeaders = const mempty
instance ToPath ApplyEnvironmentManagedAction where
toPath = const "/"
instance ToQuery ApplyEnvironmentManagedAction where
toQuery ApplyEnvironmentManagedAction'{..}
= mconcat
["Action" =:
("ApplyEnvironmentManagedAction" :: ByteString),
"Version" =: ("2010-12-01" :: ByteString),
"EnvironmentName" =: _aemaEnvironmentName,
"EnvironmentId" =: _aemaEnvironmentId,
"ActionId" =: _aemaActionId]
data ApplyEnvironmentManagedActionResponse = ApplyEnvironmentManagedActionResponse'
{ _aemarsStatus :: !(Maybe Text)
, _aemarsActionId :: !(Maybe Text)
, _aemarsActionDescription :: !(Maybe Text)
, _aemarsActionType :: !(Maybe ActionType)
, _aemarsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
applyEnvironmentManagedActionResponse
:: Int
-> ApplyEnvironmentManagedActionResponse
applyEnvironmentManagedActionResponse pResponseStatus_ =
ApplyEnvironmentManagedActionResponse'
{ _aemarsStatus = Nothing
, _aemarsActionId = Nothing
, _aemarsActionDescription = Nothing
, _aemarsActionType = Nothing
, _aemarsResponseStatus = pResponseStatus_
}
aemarsStatus :: Lens' ApplyEnvironmentManagedActionResponse (Maybe Text)
aemarsStatus = lens _aemarsStatus (\ s a -> s{_aemarsStatus = a});
aemarsActionId :: Lens' ApplyEnvironmentManagedActionResponse (Maybe Text)
aemarsActionId = lens _aemarsActionId (\ s a -> s{_aemarsActionId = a});
aemarsActionDescription :: Lens' ApplyEnvironmentManagedActionResponse (Maybe Text)
aemarsActionDescription = lens _aemarsActionDescription (\ s a -> s{_aemarsActionDescription = a});
aemarsActionType :: Lens' ApplyEnvironmentManagedActionResponse (Maybe ActionType)
aemarsActionType = lens _aemarsActionType (\ s a -> s{_aemarsActionType = a});
aemarsResponseStatus :: Lens' ApplyEnvironmentManagedActionResponse Int
aemarsResponseStatus = lens _aemarsResponseStatus (\ s a -> s{_aemarsResponseStatus = a});
instance NFData ApplyEnvironmentManagedActionResponse