The UN Security Council has passed a resolution put forward by GCC members calling on Iran to halt attacks on the Gulf.