Do Palestinians have a legal right to resist the occupation by Israel with armed force ?

According to international law, it is legitimate for an occupied people to resist occupation by any means available to them. United Nations resolution 37/43:

“Reaffirms the legitimacy of the struggle of peoples for independence, territorial integrity, national unity and liberation from colonial and foreign domination and foreign occupation by all available means, including armed struggle”.

It further specifically mentions the Palestinian people as possessing this right:

“Reaffirms the inalienable right of the Namibian people, the Palestinian people and all peoples under foreign and colonial domination to self-determination, national independence, territorial integrity, national unity and sovereignty without outside interference”.

But even if such a right was not enshrined in international law, it is natural for humans to want to rid themselves from the domination of others.
Palestinians have the right to defend themselves.