module Network.AWS.RDS.DeleteEventSubscription
(
DeleteEventSubscription
, deleteEventSubscription
, desSubscriptionName
, DeleteEventSubscriptionResponse
, deleteEventSubscriptionResponse
, desrEventSubscription
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.RDS.Types
import qualified GHC.Exts
newtype DeleteEventSubscription = DeleteEventSubscription
{ _desSubscriptionName :: Text
} deriving (Eq, Ord, Show, Monoid, IsString)
deleteEventSubscription :: Text
-> DeleteEventSubscription
deleteEventSubscription p1 = DeleteEventSubscription
{ _desSubscriptionName = p1
}
desSubscriptionName :: Lens' DeleteEventSubscription Text
desSubscriptionName =
lens _desSubscriptionName (\s a -> s { _desSubscriptionName = a })
newtype DeleteEventSubscriptionResponse = DeleteEventSubscriptionResponse
{ _desrEventSubscription :: Maybe EventSubscription
} deriving (Eq, Show)
deleteEventSubscriptionResponse :: DeleteEventSubscriptionResponse
deleteEventSubscriptionResponse = DeleteEventSubscriptionResponse
{ _desrEventSubscription = Nothing
}
desrEventSubscription :: Lens' DeleteEventSubscriptionResponse (Maybe EventSubscription)
desrEventSubscription =
lens _desrEventSubscription (\s a -> s { _desrEventSubscription = a })
instance ToPath DeleteEventSubscription where
toPath = const "/"
instance ToQuery DeleteEventSubscription where
toQuery DeleteEventSubscription{..} = mconcat
[ "SubscriptionName" =? _desSubscriptionName
]
instance ToHeaders DeleteEventSubscription
instance AWSRequest DeleteEventSubscription where
type Sv DeleteEventSubscription = RDS
type Rs DeleteEventSubscription = DeleteEventSubscriptionResponse
request = post "DeleteEventSubscription"
response = xmlResponse
instance FromXML DeleteEventSubscriptionResponse where
parseXML = withElement "DeleteEventSubscriptionResult" $ \x -> DeleteEventSubscriptionResponse
<$> x .@? "EventSubscription"