You might only need to switch the data pin, since even with power and ground this will switch data between devices with no harm.
This type of switch would be a "SPDT switch" (1 pole 2 throws)
If you really do wish to switch off the bus power too, then leave the ground connected as it is of no consequence (there are even positive reasons to not break and reconnect ground lines)
This would require a "DPDT switch" (2 poles, 2 throws)
To kill all three lines (almost certainly not necessary) then use a three pole two throw switch... but like I say, there's almost never a good reason to do so.
Now, consider whether you need to ask for a three position double pole switch with a "centre off position" ... This would cut the connection to both devices simultaneously.
A 'centre off' could also be achieved by upgrading the above switches to triple-throw (1P3T/SP3T, 2P3T/DP3T) ... this gives three outputs. To use this you'd connect the first set of outputs to Device 1, leave one set of output pins unconnected, and connect the last set of outputs to Device 2. This is basically what a "centre off" switch does, except they simply miss out the un-needed pins from the package, making the pinout simpler.
Unless there is a strong reason not to, I'd go with the SPDT switch on the data line.
Also, bear in mind that switching data on and off whilst the devices are talking may result in errors and bad data... depending on the error correction available on the devices, this data might be acted on - resulting in unintended consequences.
A better procedure entirely is to use a digital switch, these will let you swap data lines cleanly and without mechanical bounce between multiple sources using cheaper switches. With a little extra circuitry you can delay actual switching till a '1' has not been detected on the line for over a threshold period - set this close to your inter-message delay and you'll never be able to 'chop' messages in half. Ask an electronics hobbyist to help with the design of such a digital switch as it requires some thought.
Also, the protocol is important. Some messages might set context for future messages, and switching between devices can result in the wrong registers being written to and potentially stop the device from working, possibly even permanently (called 'bricking')
Whichever way you do this, if the devices are important - it may be advisable to turn off the devices before switching paths, then start them back up again. This isn't always necessary, but devices with complicated configurations and protocols may well benefit from this safeguard.