module Network.AWS.SES.UpdateReceiptRule
(
updateReceiptRule
, UpdateReceiptRule
, urrRuleSetName
, urrRule
, updateReceiptRuleResponse
, UpdateReceiptRuleResponse
, urrrsResponseStatus
) where
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.SES.Types
import Network.AWS.SES.Types.Product
data UpdateReceiptRule = UpdateReceiptRule'
{ _urrRuleSetName :: !Text
, _urrRule :: !ReceiptRule
} deriving (Eq,Read,Show,Data,Typeable,Generic)
updateReceiptRule
:: Text
-> ReceiptRule
-> UpdateReceiptRule
updateReceiptRule pRuleSetName_ pRule_ =
UpdateReceiptRule'
{ _urrRuleSetName = pRuleSetName_
, _urrRule = pRule_
}
urrRuleSetName :: Lens' UpdateReceiptRule Text
urrRuleSetName = lens _urrRuleSetName (\ s a -> s{_urrRuleSetName = a});
urrRule :: Lens' UpdateReceiptRule ReceiptRule
urrRule = lens _urrRule (\ s a -> s{_urrRule = a});
instance AWSRequest UpdateReceiptRule where
type Rs UpdateReceiptRule = UpdateReceiptRuleResponse
request = postQuery sES
response
= receiveXMLWrapper "UpdateReceiptRuleResult"
(\ s h x ->
UpdateReceiptRuleResponse' <$> (pure (fromEnum s)))
instance ToHeaders UpdateReceiptRule where
toHeaders = const mempty
instance ToPath UpdateReceiptRule where
toPath = const "/"
instance ToQuery UpdateReceiptRule where
toQuery UpdateReceiptRule'{..}
= mconcat
["Action" =: ("UpdateReceiptRule" :: ByteString),
"Version" =: ("2010-12-01" :: ByteString),
"RuleSetName" =: _urrRuleSetName, "Rule" =: _urrRule]
newtype UpdateReceiptRuleResponse = UpdateReceiptRuleResponse'
{ _urrrsResponseStatus :: Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
updateReceiptRuleResponse
:: Int
-> UpdateReceiptRuleResponse
updateReceiptRuleResponse pResponseStatus_ =
UpdateReceiptRuleResponse'
{ _urrrsResponseStatus = pResponseStatus_
}
urrrsResponseStatus :: Lens' UpdateReceiptRuleResponse Int
urrrsResponseStatus = lens _urrrsResponseStatus (\ s a -> s{_urrrsResponseStatus = a});