“Israel has the apparent legitimacy to attack Iran,” said Yaakov Amidror, a former major general and national security adviser in Israel who is now at the conservative-leaning Jerusalem Institute for Strategy and Security.

“The other option is to say, we achieved what we wanted by eliminating the Al Quds Force commanders in Damascus, the Iranian attack failed, so let’s do what we need to do,” he said — which means finishing the campaign against Hamas in Gaza and investing in preparations to take on Hezbollah in Lebanon.

“Both are good options,” he said. “Each has pros and cons. It’s a matter of preference.”

Foreign leaders, chief among them President Biden, Israel’s most important supporter, have been pressing for restraint. Mr. Netanyahu has not publicly threatened Iran since the attack ended on Sunday morning. Other Israeli military and political leaders say they want to preserve and strengthen, not jeopardize, the alliance of Western and moderate Arab countries that, for the first time, came together to repel the Iranian attack and defend Israel.

The Iranian attack has given Israel a burst of international support after months of censure and opprobrium over the scope of the killing and hunger in Gaza, and some officials say that means Israel should act against Iran only in coordination with its allies.

“Israel versus Iran, the world versus Iran,” Benny Gantz, a centrist member of Israel’s war cabinet, said on Sunday, laying out the choices. “The strategic alliance and the regional cooperation system between us has been seriously put to the test, and now is the time for us to strengthen it. We’ll build a regional coalition against the Iranian threat and exact the price from Iran in the manner and at the time right for us.”

Israel’s options range from openly striking Iran, symbolically or with full force, to not retaliating at all, a concession that experts say Israel could leverage to encourage further international sanctioning of Iran or the formalization of the anti-Iranian alliance.

There is a precedent for doing nothing: During the Gulf War of 1991, as Iraq lobbed Scud missiles at Israeli cities, Yitzhak Shamir, then Israel’s hawkish prime minister, exercised restraint at the urging of the Bush administration to preserve the American-led coalition with friendly Arab states.

Israel could also orchestrate some kind of bloodless cyberattack or revert to the ways of its yearslong shadow war with Iran, relying on spy craft and covert actions against Iranian interests, inside or outside Iran, without claiming responsibility for them.

world