{-# 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.ELBv2.DeleteRule
(
deleteRule
, DeleteRule
, drRuleARN
, deleteRuleResponse
, DeleteRuleResponse
, drrsResponseStatus
) where
import Network.AWS.ELBv2.Types
import Network.AWS.ELBv2.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteRule = DeleteRule'
{ _drRuleARN :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteRule
:: Text
-> DeleteRule
deleteRule pRuleARN_ =
DeleteRule'
{ _drRuleARN = pRuleARN_
}
drRuleARN :: Lens' DeleteRule Text
drRuleARN = lens _drRuleARN (\ s a -> s{_drRuleARN = a});
instance AWSRequest DeleteRule where
type Rs DeleteRule = DeleteRuleResponse
request = postQuery eLBv2
response
= receiveXMLWrapper "DeleteRuleResult"
(\ s h x ->
DeleteRuleResponse' <$> (pure (fromEnum s)))
instance Hashable DeleteRule
instance NFData DeleteRule
instance ToHeaders DeleteRule where
toHeaders = const mempty
instance ToPath DeleteRule where
toPath = const "/"
instance ToQuery DeleteRule where
toQuery DeleteRule'{..}
= mconcat
["Action" =: ("DeleteRule" :: ByteString),
"Version" =: ("2015-12-01" :: ByteString),
"RuleArn" =: _drRuleARN]
newtype DeleteRuleResponse = DeleteRuleResponse'
{ _drrsResponseStatus :: Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteRuleResponse
:: Int
-> DeleteRuleResponse
deleteRuleResponse pResponseStatus_ =
DeleteRuleResponse'
{ _drrsResponseStatus = pResponseStatus_
}
drrsResponseStatus :: Lens' DeleteRuleResponse Int
drrsResponseStatus = lens _drrsResponseStatus (\ s a -> s{_drrsResponseStatus = a});
instance NFData DeleteRuleResponse