module Network.AWS.RDS.DeleteEventSubscription
(
deleteEventSubscription
, DeleteEventSubscription
, desSubscriptionName
, deleteEventSubscriptionResponse
, DeleteEventSubscriptionResponse
, drsEventSubscription
, drsStatus
) where
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 Sv DeleteEventSubscription = RDS
type Rs DeleteEventSubscription =
DeleteEventSubscriptionResponse
request = postQuery
response
= receiveXMLWrapper "DeleteEventSubscriptionResult"
(\ s h x ->
DeleteEventSubscriptionResponse' <$>
(x .@? "EventSubscription") <*> (pure (fromEnum s)))
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)
, _drsStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteEventSubscriptionResponse
:: Int
-> DeleteEventSubscriptionResponse
deleteEventSubscriptionResponse pStatus_ =
DeleteEventSubscriptionResponse'
{ _drsEventSubscription = Nothing
, _drsStatus = pStatus_
}
drsEventSubscription :: Lens' DeleteEventSubscriptionResponse (Maybe EventSubscription)
drsEventSubscription = lens _drsEventSubscription (\ s a -> s{_drsEventSubscription = a});
drsStatus :: Lens' DeleteEventSubscriptionResponse Int
drsStatus = lens _drsStatus (\ s a -> s{_drsStatus = a});