Cable mounted brake light switch anyone?
Cable mounted switches exist, both in the motorbike world and the electric bike world.
Two main sorts are available - switching via mechanical means, and switching via a magnet. Your application may require one or the other.
Switching mechanically is nothing more than having a toggle switch fastened to your bowden cable inner, and mounted rigidly so that pulling the inner cable switches the switch. Poor picture but imagine this with the bowden cable inner clamped to the slider. Downside is the switch will limit the travel of the inner.
Electronic/magnetic switching straps a permanent magnet to your bowden cable inner, and then runs that magnet past a reed switch. They relay will be either a Normally Open or a Normally Closed, and will close or open as the magnet moves. Downside is that these cannot take much current, so are often used to drive a relay capable of higher currents.
You haven't explained your need, but there are brake levers that incorporate a switch. These are found on electric bikes, and are normally wired to cut power to the motor if the rider brakes. Some electric bikes will take that signal and cut in electric braking.
If you had hydraulics then there are all manner of pressure switches, used in automotive brake systems. However they would affect the speed at which your hydraulic brakes activate and would void any warranty.
This is the brake light I've got. It's not really in the right place for visibility on my bike, or bright enough to be worth much in traffic, so I've been considering how I might use it as a switch. One way would be to replace the battery with a piece of metal of the same size and bring wires out the LED hole. Another would be to attach a phototransistor and use that to switch a bigger light. Because it uses a piece of spring steel to actuate the switch, it doesn't restrict the brake cable travel. It must incrase the force required to use the brake, but only marginally -- I certainly can't feel it.