It's all listed in
Dial 911 and Die
In California the section is §845 in the Government Code. All states have something similar.
§845. Neither a public entity nor a public employee is liable for failure to establish a police department or otherwise to provide
police protection service or, if police protection service is provided, for failure to provide sufficient police protection
service.
A police department shall not fail to respond to a request for service via a burglar alarm system or an alarm company referral service solely on the basis that a permit from the city has not been
obtained.