module Network.AWS.RDS.AddSourceIdentifierToSubscription
(
addSourceIdentifierToSubscription
, AddSourceIdentifierToSubscription
, asitsSubscriptionName
, asitsSourceIdentifier
, addSourceIdentifierToSubscriptionResponse
, AddSourceIdentifierToSubscriptionResponse
, asitsrsEventSubscription
, asitsrsResponseStatus
) where
import Network.AWS.Prelude
import Network.AWS.RDS.Types
import Network.AWS.RDS.Types.Product
import Network.AWS.Request
import Network.AWS.Response
data AddSourceIdentifierToSubscription = AddSourceIdentifierToSubscription'
{ _asitsSubscriptionName :: !Text
, _asitsSourceIdentifier :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
addSourceIdentifierToSubscription
:: Text
-> Text
-> AddSourceIdentifierToSubscription
addSourceIdentifierToSubscription pSubscriptionName_ pSourceIdentifier_ =
AddSourceIdentifierToSubscription'
{ _asitsSubscriptionName = pSubscriptionName_
, _asitsSourceIdentifier = pSourceIdentifier_
}
asitsSubscriptionName :: Lens' AddSourceIdentifierToSubscription Text
asitsSubscriptionName = lens _asitsSubscriptionName (\ s a -> s{_asitsSubscriptionName = a});
asitsSourceIdentifier :: Lens' AddSourceIdentifierToSubscription Text
asitsSourceIdentifier = lens _asitsSourceIdentifier (\ s a -> s{_asitsSourceIdentifier = a});
instance AWSRequest AddSourceIdentifierToSubscription
where
type Rs AddSourceIdentifierToSubscription =
AddSourceIdentifierToSubscriptionResponse
request = postQuery rDS
response
= receiveXMLWrapper
"AddSourceIdentifierToSubscriptionResult"
(\ s h x ->
AddSourceIdentifierToSubscriptionResponse' <$>
(x .@? "EventSubscription") <*> (pure (fromEnum s)))
instance ToHeaders AddSourceIdentifierToSubscription
where
toHeaders = const mempty
instance ToPath AddSourceIdentifierToSubscription
where
toPath = const "/"
instance ToQuery AddSourceIdentifierToSubscription
where
toQuery AddSourceIdentifierToSubscription'{..}
= mconcat
["Action" =:
("AddSourceIdentifierToSubscription" :: ByteString),
"Version" =: ("2014-10-31" :: ByteString),
"SubscriptionName" =: _asitsSubscriptionName,
"SourceIdentifier" =: _asitsSourceIdentifier]
data AddSourceIdentifierToSubscriptionResponse = AddSourceIdentifierToSubscriptionResponse'
{ _asitsrsEventSubscription :: !(Maybe EventSubscription)
, _asitsrsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
addSourceIdentifierToSubscriptionResponse
:: Int
-> AddSourceIdentifierToSubscriptionResponse
addSourceIdentifierToSubscriptionResponse pResponseStatus_ =
AddSourceIdentifierToSubscriptionResponse'
{ _asitsrsEventSubscription = Nothing
, _asitsrsResponseStatus = pResponseStatus_
}
asitsrsEventSubscription :: Lens' AddSourceIdentifierToSubscriptionResponse (Maybe EventSubscription)
asitsrsEventSubscription = lens _asitsrsEventSubscription (\ s a -> s{_asitsrsEventSubscription = a});
asitsrsResponseStatus :: Lens' AddSourceIdentifierToSubscriptionResponse Int
asitsrsResponseStatus = lens _asitsrsResponseStatus (\ s a -> s{_asitsrsResponseStatus = a});