module Network.AWS.SSM.StopAutomationExecution
(
stopAutomationExecution
, StopAutomationExecution
, saeAutomationExecutionId
, stopAutomationExecutionResponse
, StopAutomationExecutionResponse
, saersResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.SSM.Types
import Network.AWS.SSM.Types.Product
newtype StopAutomationExecution = StopAutomationExecution'
{ _saeAutomationExecutionId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
stopAutomationExecution
:: Text
-> StopAutomationExecution
stopAutomationExecution pAutomationExecutionId_ =
StopAutomationExecution' {_saeAutomationExecutionId = pAutomationExecutionId_}
saeAutomationExecutionId :: Lens' StopAutomationExecution Text
saeAutomationExecutionId = lens _saeAutomationExecutionId (\ s a -> s{_saeAutomationExecutionId = a});
instance AWSRequest StopAutomationExecution where
type Rs StopAutomationExecution =
StopAutomationExecutionResponse
request = postJSON ssm
response
= receiveEmpty
(\ s h x ->
StopAutomationExecutionResponse' <$>
(pure (fromEnum s)))
instance Hashable StopAutomationExecution where
instance NFData StopAutomationExecution where
instance ToHeaders StopAutomationExecution where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AmazonSSM.StopAutomationExecution" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON StopAutomationExecution where
toJSON StopAutomationExecution'{..}
= object
(catMaybes
[Just
("AutomationExecutionId" .=
_saeAutomationExecutionId)])
instance ToPath StopAutomationExecution where
toPath = const "/"
instance ToQuery StopAutomationExecution where
toQuery = const mempty
newtype StopAutomationExecutionResponse = StopAutomationExecutionResponse'
{ _saersResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
stopAutomationExecutionResponse
:: Int
-> StopAutomationExecutionResponse
stopAutomationExecutionResponse pResponseStatus_ =
StopAutomationExecutionResponse' {_saersResponseStatus = pResponseStatus_}
saersResponseStatus :: Lens' StopAutomationExecutionResponse Int
saersResponseStatus = lens _saersResponseStatus (\ s a -> s{_saersResponseStatus = a});
instance NFData StopAutomationExecutionResponse where