module Network.AWS.RDS.DeleteEventSubscription
(
deleteEventSubscription
, DeleteEventSubscription
, desSubscriptionName
, deleteEventSubscriptionResponse
, DeleteEventSubscriptionResponse
, drsEventSubscription
, drsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.RDS.Types
import Network.AWS.RDS.Types.Product
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteEventSubscription = DeleteEventSubscription'
{ _desSubscriptionName :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteEventSubscription
:: Text
-> DeleteEventSubscription
deleteEventSubscription pSubscriptionName_ =
DeleteEventSubscription' {_desSubscriptionName = pSubscriptionName_}
desSubscriptionName :: Lens' DeleteEventSubscription Text
desSubscriptionName = lens _desSubscriptionName (\ s a -> s{_desSubscriptionName = a});
instance AWSRequest DeleteEventSubscription where
type Rs DeleteEventSubscription =
DeleteEventSubscriptionResponse
request = postQuery rds
response
= receiveXMLWrapper "DeleteEventSubscriptionResult"
(\ s h x ->
DeleteEventSubscriptionResponse' <$>
(x .@? "EventSubscription") <*> (pure (fromEnum s)))
instance Hashable DeleteEventSubscription where
instance NFData DeleteEventSubscription where
instance ToHeaders DeleteEventSubscription where
toHeaders = const mempty
instance ToPath DeleteEventSubscription where
toPath = const "/"
instance ToQuery DeleteEventSubscription where
toQuery DeleteEventSubscription'{..}
= mconcat
["Action" =:
("DeleteEventSubscription" :: ByteString),
"Version" =: ("2014-10-31" :: ByteString),
"SubscriptionName" =: _desSubscriptionName]
data DeleteEventSubscriptionResponse = DeleteEventSubscriptionResponse'
{ _drsEventSubscription :: !(Maybe EventSubscription)
, _drsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteEventSubscriptionResponse
:: Int
-> DeleteEventSubscriptionResponse
deleteEventSubscriptionResponse pResponseStatus_ =
DeleteEventSubscriptionResponse'
{_drsEventSubscription = Nothing, _drsResponseStatus = pResponseStatus_}
drsEventSubscription :: Lens' DeleteEventSubscriptionResponse (Maybe EventSubscription)
drsEventSubscription = lens _drsEventSubscription (\ s a -> s{_drsEventSubscription = a});
drsResponseStatus :: Lens' DeleteEventSubscriptionResponse Int
drsResponseStatus = lens _drsResponseStatus (\ s a -> s{_drsResponseStatus = a});
instance NFData DeleteEventSubscriptionResponse where