Driving a GPIO input with a momentary switch
I'm sure you can use it on your RPI.

Note the example you mentioned has no illumination. Probably there are switches with illumination.

In that case it needs multiple GPIO pins, probably one for the switch, and one for the LED (except from GND).

For a switch you don't need a resistor (probably you can use a pull up/down resistor within the RPI).

For the LED you have to calculate the resistor value, this depends on the voltage (3.3 V or 5 V, not sure what RPI uses), the forward voltage of the LED and how bright it should shine.

For the input you need to use a (siimple) debouncing algorithm.

Both GPIO pins can be controlled from the RPI (meaning: the input pin you can check for the value: LOW/HIGH), the pin for the LED can be set.