Agree on a solenoid which is an off-on, spring loaded switch. Powering up, it goes from closed to fully open and cut power and the spring slams it shut. Beware of transients in the system using a solenoid. Kinetic energy stored in the flowing fluid has to be absorbed somewhere when you try to stop it. Best thing would be either a Water Hammer type device, like used in household plumbing for absorbing shock from the washing machine or dish washer turning on and off (very impractical in a simple, small system, or a slowly moving device of which I know not. Cutting engine rpms to idle can go a long way in making a solenoid work for you....just don't forget to idle down first when stopping the flow.
W.W. Graingers is one source.