module Network.AWS.RDS.AddSourceIdentifierToSubscription
(
AddSourceIdentifierToSubscription
, addSourceIdentifierToSubscription
, asitsSourceIdentifier
, asitsSubscriptionName
, AddSourceIdentifierToSubscriptionResponse
, addSourceIdentifierToSubscriptionResponse
, asitsrEventSubscription
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.RDS.Types
import qualified GHC.Exts
data AddSourceIdentifierToSubscription = AddSourceIdentifierToSubscription
{ _asitsSourceIdentifier :: Text
, _asitsSubscriptionName :: Text
} deriving (Eq, Ord, Read, Show)
addSourceIdentifierToSubscription :: Text
-> Text
-> AddSourceIdentifierToSubscription
addSourceIdentifierToSubscription p1 p2 = AddSourceIdentifierToSubscription
{ _asitsSubscriptionName = p1
, _asitsSourceIdentifier = p2
}
asitsSourceIdentifier :: Lens' AddSourceIdentifierToSubscription Text
asitsSourceIdentifier =
lens _asitsSourceIdentifier (\s a -> s { _asitsSourceIdentifier = a })
asitsSubscriptionName :: Lens' AddSourceIdentifierToSubscription Text
asitsSubscriptionName =
lens _asitsSubscriptionName (\s a -> s { _asitsSubscriptionName = a })
newtype AddSourceIdentifierToSubscriptionResponse = AddSourceIdentifierToSubscriptionResponse
{ _asitsrEventSubscription :: Maybe EventSubscription
} deriving (Eq, Read, Show)
addSourceIdentifierToSubscriptionResponse :: AddSourceIdentifierToSubscriptionResponse
addSourceIdentifierToSubscriptionResponse = AddSourceIdentifierToSubscriptionResponse
{ _asitsrEventSubscription = Nothing
}
asitsrEventSubscription :: Lens' AddSourceIdentifierToSubscriptionResponse (Maybe EventSubscription)
asitsrEventSubscription =
lens _asitsrEventSubscription (\s a -> s { _asitsrEventSubscription = a })
instance ToPath AddSourceIdentifierToSubscription where
toPath = const "/"
instance ToQuery AddSourceIdentifierToSubscription where
toQuery AddSourceIdentifierToSubscription{..} = mconcat
[ "SourceIdentifier" =? _asitsSourceIdentifier
, "SubscriptionName" =? _asitsSubscriptionName
]
instance ToHeaders AddSourceIdentifierToSubscription
instance AWSRequest AddSourceIdentifierToSubscription where
type Sv AddSourceIdentifierToSubscription = RDS
type Rs AddSourceIdentifierToSubscription = AddSourceIdentifierToSubscriptionResponse
request = post "AddSourceIdentifierToSubscription"
response = xmlResponse
instance FromXML AddSourceIdentifierToSubscriptionResponse where
parseXML = withElement "AddSourceIdentifierToSubscriptionResult" $ \x -> AddSourceIdentifierToSubscriptionResponse
<$> x .@? "EventSubscription"