module Network.AWS.EC2.DeleteRoute
(
deleteRoute
, DeleteRoute
, drDryRun
, drRouteTableId
, drDestinationCIdRBlock
, deleteRouteResponse
, DeleteRouteResponse
) where
import Network.AWS.EC2.Types
import Network.AWS.EC2.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DeleteRoute = DeleteRoute'
{ _drDryRun :: !(Maybe Bool)
, _drRouteTableId :: !Text
, _drDestinationCIdRBlock :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteRoute
:: Text
-> Text
-> DeleteRoute
deleteRoute pRouteTableId_ pDestinationCIdRBlock_ =
DeleteRoute'
{ _drDryRun = Nothing
, _drRouteTableId = pRouteTableId_
, _drDestinationCIdRBlock = pDestinationCIdRBlock_
}
drDryRun :: Lens' DeleteRoute (Maybe Bool)
drDryRun = lens _drDryRun (\ s a -> s{_drDryRun = a});
drRouteTableId :: Lens' DeleteRoute Text
drRouteTableId = lens _drRouteTableId (\ s a -> s{_drRouteTableId = a});
drDestinationCIdRBlock :: Lens' DeleteRoute Text
drDestinationCIdRBlock = lens _drDestinationCIdRBlock (\ s a -> s{_drDestinationCIdRBlock = a});
instance AWSRequest DeleteRoute where
type Rs DeleteRoute = DeleteRouteResponse
request = postQuery ec2
response = receiveNull DeleteRouteResponse'
instance Hashable DeleteRoute
instance NFData DeleteRoute
instance ToHeaders DeleteRoute where
toHeaders = const mempty
instance ToPath DeleteRoute where
toPath = const "/"
instance ToQuery DeleteRoute where
toQuery DeleteRoute'{..}
= mconcat
["Action" =: ("DeleteRoute" :: ByteString),
"Version" =: ("2015-10-01" :: ByteString),
"DryRun" =: _drDryRun,
"RouteTableId" =: _drRouteTableId,
"DestinationCidrBlock" =: _drDestinationCIdRBlock]
data DeleteRouteResponse =
DeleteRouteResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteRouteResponse
:: DeleteRouteResponse
deleteRouteResponse = DeleteRouteResponse'
instance NFData DeleteRouteResponse