Help, do you know what is this component ??

Hey guys, I can't find what is this component, it came in my arduino starter kit ...
when you shake it , sounds like it has a little ball moving inside ...

photo 1

photo 2

(deleted)

awww thank you ! seems to be the case.. it's just on/off right? when the ball is not contacting the connectors, it's off