The United States has said it has foiled a plot by Iran to assassinate the Saudi Arabian ambassador to the U.S.