The United Nations Charter outlaws the "threat of the use of force." Imagine if Iran had been threatening to invade or bomb the US or Israel. According to official US/Israeli doctrine, they would have the right to bomb and invade them.