Penal Code § 834a
CHAPTER 5. Arrest, by Whom and How Made
If a person has knowledge, or by the exercise of reasonable care, should have knowledge, that he is being arrested by a peace officer, it is the duty of such person to refrain from using force or any weapon to resist such arrest.