The Charter states that "the Security Council shall determine the existence of any threat to the peace, breach of the peace, or act of aggression, and shall make recommendations, or decide what measures shall be taken in accordance with Articles 41 and 42," which detail the preferred "measures not involving the use of armed force" and permit the Security Council to take further action if it finds such measures inadequate.
The only exception is Article 51, which permits the "right of individual or collective self-defence" against "armed attack ... until the Security Council has taken measures necessary to maintain international peace and security". Under international law, such self-defence is authorised only when its necessity is instant, overwhelming, leaving no moment for deliberation.
Citing these facts in the wake of the June 1993 missile strikes on Iraq (which killed eight civilians) Alfred Rubin, a specialist on international law, observed that "the law of self-defence has nothing to do with retaliation or reprisals".
Were Cuba to strafe Miami with Libyan support in defence of its "vital interests" I think Mr O'Brien's response would be different.