module Network.AWS.AutoScaling.DeleteLifecycleHook
(
deleteLifecycleHook
, DeleteLifecycleHook
, delLifecycleHookName
, delAutoScalingGroupName
, deleteLifecycleHookResponse
, DeleteLifecycleHookResponse
, drsResponseStatus
) where
import Network.AWS.AutoScaling.Types
import Network.AWS.AutoScaling.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DeleteLifecycleHook = DeleteLifecycleHook'
{ _delLifecycleHookName :: !Text
, _delAutoScalingGroupName :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteLifecycleHook
:: Text
-> Text
-> DeleteLifecycleHook
deleteLifecycleHook pLifecycleHookName_ pAutoScalingGroupName_ =
DeleteLifecycleHook'
{ _delLifecycleHookName = pLifecycleHookName_
, _delAutoScalingGroupName = pAutoScalingGroupName_
}
delLifecycleHookName :: Lens' DeleteLifecycleHook Text
delLifecycleHookName = lens _delLifecycleHookName (\ s a -> s{_delLifecycleHookName = a});
delAutoScalingGroupName :: Lens' DeleteLifecycleHook Text
delAutoScalingGroupName = lens _delAutoScalingGroupName (\ s a -> s{_delAutoScalingGroupName = a});
instance AWSRequest DeleteLifecycleHook where
type Rs DeleteLifecycleHook =
DeleteLifecycleHookResponse
request = postQuery autoScaling
response
= receiveXMLWrapper "DeleteLifecycleHookResult"
(\ s h x ->
DeleteLifecycleHookResponse' <$> (pure (fromEnum s)))
instance ToHeaders DeleteLifecycleHook where
toHeaders = const mempty
instance ToPath DeleteLifecycleHook where
toPath = const "/"
instance ToQuery DeleteLifecycleHook where
toQuery DeleteLifecycleHook'{..}
= mconcat
["Action" =: ("DeleteLifecycleHook" :: ByteString),
"Version" =: ("2011-01-01" :: ByteString),
"LifecycleHookName" =: _delLifecycleHookName,
"AutoScalingGroupName" =: _delAutoScalingGroupName]
newtype DeleteLifecycleHookResponse = DeleteLifecycleHookResponse'
{ _drsResponseStatus :: Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteLifecycleHookResponse
:: Int
-> DeleteLifecycleHookResponse
deleteLifecycleHookResponse pResponseStatus_ =
DeleteLifecycleHookResponse'
{ _drsResponseStatus = pResponseStatus_
}
drsResponseStatus :: Lens' DeleteLifecycleHookResponse Int
drsResponseStatus = lens _drsResponseStatus (\ s a -> s{_drsResponseStatus = a});