{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.SES.CreateConfigurationSetEventDestination
(
createConfigurationSetEventDestination
, CreateConfigurationSetEventDestination
, ccsedConfigurationSetName
, ccsedEventDestination
, createConfigurationSetEventDestinationResponse
, CreateConfigurationSetEventDestinationResponse
, ccsedrsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.SES.Types
import Network.AWS.SES.Types.Product
data CreateConfigurationSetEventDestination = CreateConfigurationSetEventDestination'
{ _ccsedConfigurationSetName :: !Text
, _ccsedEventDestination :: !EventDestination
} deriving (Eq, Read, Show, Data, Typeable, Generic)
createConfigurationSetEventDestination
:: Text
-> EventDestination
-> CreateConfigurationSetEventDestination
createConfigurationSetEventDestination pConfigurationSetName_ pEventDestination_ =
CreateConfigurationSetEventDestination'
{ _ccsedConfigurationSetName = pConfigurationSetName_
, _ccsedEventDestination = pEventDestination_
}
ccsedConfigurationSetName :: Lens' CreateConfigurationSetEventDestination Text
ccsedConfigurationSetName = lens _ccsedConfigurationSetName (\ s a -> s{_ccsedConfigurationSetName = a})
ccsedEventDestination :: Lens' CreateConfigurationSetEventDestination EventDestination
ccsedEventDestination = lens _ccsedEventDestination (\ s a -> s{_ccsedEventDestination = a})
instance AWSRequest
CreateConfigurationSetEventDestination
where
type Rs CreateConfigurationSetEventDestination =
CreateConfigurationSetEventDestinationResponse
request = postQuery ses
response
= receiveXMLWrapper
"CreateConfigurationSetEventDestinationResult"
(\ s h x ->
CreateConfigurationSetEventDestinationResponse' <$>
(pure (fromEnum s)))
instance Hashable
CreateConfigurationSetEventDestination
where
instance NFData
CreateConfigurationSetEventDestination
where
instance ToHeaders
CreateConfigurationSetEventDestination
where
toHeaders = const mempty
instance ToPath
CreateConfigurationSetEventDestination
where
toPath = const "/"
instance ToQuery
CreateConfigurationSetEventDestination
where
toQuery CreateConfigurationSetEventDestination'{..}
= mconcat
["Action" =:
("CreateConfigurationSetEventDestination" ::
ByteString),
"Version" =: ("2010-12-01" :: ByteString),
"ConfigurationSetName" =: _ccsedConfigurationSetName,
"EventDestination" =: _ccsedEventDestination]
newtype CreateConfigurationSetEventDestinationResponse = CreateConfigurationSetEventDestinationResponse'
{ _ccsedrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
createConfigurationSetEventDestinationResponse
:: Int
-> CreateConfigurationSetEventDestinationResponse
createConfigurationSetEventDestinationResponse pResponseStatus_ =
CreateConfigurationSetEventDestinationResponse'
{_ccsedrsResponseStatus = pResponseStatus_}
ccsedrsResponseStatus :: Lens' CreateConfigurationSetEventDestinationResponse Int
ccsedrsResponseStatus = lens _ccsedrsResponseStatus (\ s a -> s{_ccsedrsResponseStatus = a})
instance NFData
CreateConfigurationSetEventDestinationResponse
where