While Hamas does have a right of armed struggle against the occupation, the taking of hostages and the killing of civilians are not permissible forms of resistance.
That said, it is almost impossible to imagine that the Israeli response would have been something lesser than the current genocide attempt if Hamas had just taken POWs during the October 7 attack. Bibi would have arguably been even more humiliated if Hamas had been acting with restraint, so the impulse for revenge would be even greater.