again as stated before ....if the nation is ruled by a sane leader...then yes.
Basic logic says, a sane leader will not attack someone if they feel the likey outcome is a loss for them.
ask yourself this....If the US said we would not attack Iran if they attacked Israel would that make them more likely to attack? The logical response is yes, because Iran knows that if could win that war...( not saying it would, but it could at least) given help it would get from others...But knowing that the US response would be powerful, and that we would be able to for the most part destroy Iran ( most likely attacks on Iraq would be air only as land attack to take over would fail...but we could cripple it to the point its leadership was forced out or removed by its own people. ) with this knowledge they of course talk bit, but don't act much.
S. Korea without US help...would most likely fall to north Korea's army. The artillery alone from N. Korea would decimate cities before south Korea even fully prepared. And North Korea would have very little to loss...its leaders don't care much if its civilians are killed...and the Economic gains would be huge if it won. thus it would have a reason to at least think about making a move....Add the US to the mix....N. Korea knows it would lose ( unless of course he is insane) and thus the incentive to take action is nothing.
Does this mean a nation may not take small pokes and prods at others, no..because it knows that the US is not going to destroy the nation for those actions...so the gains or , power or prestige or what ever are weighted against the expected reprisal attack or sanctions...not against a full war.
its more or less the same theory that is used for arms races...if you have enough guns...X will not attack...the outcome ends up. X or y spends to much and fails its leaders removed...or one side thinks if has the upper hand and can win...then moves on the other....it would be rare to see one side think it would lose...but choose to attack anyway.
A debate is also made about if Arms races cause wars, or prevent them...I know based on data I looked at , with many variables and factors in the computer system based on thosands of wars...no clear case could be found one way or the other...