module Network.AWS.EC2.DeleteRoute
(
DeleteRoute
, deleteRoute
, drDestinationCidrBlock
, drDryRun
, drRouteTableId
, DeleteRouteResponse
, deleteRouteResponse
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.EC2.Types
import qualified GHC.Exts
data DeleteRoute = DeleteRoute
{ _drDestinationCidrBlock :: Text
, _drDryRun :: Maybe Bool
, _drRouteTableId :: Text
} deriving (Eq, Ord, Show)
deleteRoute :: Text
-> Text
-> DeleteRoute
deleteRoute p1 p2 = DeleteRoute
{ _drRouteTableId = p1
, _drDestinationCidrBlock = p2
, _drDryRun = Nothing
}
drDestinationCidrBlock :: Lens' DeleteRoute Text
drDestinationCidrBlock =
lens _drDestinationCidrBlock (\s a -> s { _drDestinationCidrBlock = a })
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 })
data DeleteRouteResponse = DeleteRouteResponse
deriving (Eq, Ord, Show, Generic)
deleteRouteResponse :: DeleteRouteResponse
deleteRouteResponse = DeleteRouteResponse
instance ToPath DeleteRoute where
toPath = const "/"
instance ToQuery DeleteRoute where
toQuery DeleteRoute{..} = mconcat
[ "destinationCidrBlock" =? _drDestinationCidrBlock
, "dryRun" =? _drDryRun
, "routeTableId" =? _drRouteTableId
]
instance ToHeaders DeleteRoute
instance AWSRequest DeleteRoute where
type Sv DeleteRoute = EC2
type Rs DeleteRoute = DeleteRouteResponse
request = post "DeleteRoute"
response = nullResponse DeleteRouteResponse