Law enforcement officer

A law enforcement officer (LEO), or peace officer in North American English, is a public-sector employee whose duties primarily involve the enforcement of laws. The phrase can include police officers, prosecutors (who are law enforcement officers but not peace officers), municipal law enforcement officers, special police officers, customs officers, state troopers, special agents, secret agents, special investigators, border patrol officers, immigration officers, court officers, probation officers, parole officers, arson investigators, auxiliary officers, game wardens, sheriffs, constables, corrections, marshals, deputies, detention officers, correction officers, sworn campus police officers and public safety officers (at public and private institutions). Security guards are civilians and therefore not law enforcement officers, unless they have been granted powers to enforce particular laws, such as those accredited under a community safety accreditation scheme such as a security police officer. 
Modern legal codes use the term "peace officer" (or in some jurisdictions, "law enforcement officer") to include every person vested by the legislating state with law enforcement authority—traditionally, anyone "sworn, badged, and armable" who can arrest, or refer such arrest for a criminal prosecution. Hence, city police officers, county sheriffs' deputies, state troopers and in some states corrections officers are usually vested with the same authority within a given jurisdiction. Contract security officers may enforce certain laws and administrative regulations, which may include detainment or apprehension authority, including arresting. Peace officers may also be able to perform all duties that a law enforcement officer is tasked with, but may or may not be armed with a weapon.
Canada.
In Canada, the Criminal Code (R.S., c. C-34, s. 2.) defines a "peace officer" as:
Section (b) allows for designation as a peace officer for a member of the Correctional Service of Canada under the following via the "Corrections and Conditional Release Act":
Also, provincial legislatures can designate a class of officers (i.e. Conservation Officers, Park Rangers and Commercial Vehicle Safety and Enforcement) to be peace officers.
Sri Lanka.
Under the "Code Of Criminal Procedure" a peace officer includes all police officers, a Divisional Assistant Government Agent and a Grama Niladharis appointed by a Government Agent (GA) in writing to perform police duties or keep the peace. A peace officer has the power to arrest a person without a warrant or an order from a magistrate under certain circumstances such as;
During the British colonial administration of Ceylon, when uniformed policing by the Ceylon Police Force in rural areas of the island was limited, the local government agent would appoint individuals from wealthy influential families deemed loyal to the crown as a Peace Officers with police powers to keep the peace. This was an influential post, the holder had much control over the people of the area. Commonly a Native Headman (Ralahami) was appointed as the Peace Officer to maintain law and order in rural villages. 
Following the formation of the State Council of Ceylon in 1931, one of its members, H. W. Amarasuriya, called for an inquiry into the headman system. A commission was formed made up of retired civil servants and lawyers headed by H.M. Wedderburn. The commission reported on reforming the headman system or replacing it with transferable District Revenue Officers. The headman system was abolished as an administrative system, with the titles of Mudaliyar (Mudali - මුදලි) and Muhandiram retained by the government to be awarded as honors. This practice remained until the suspension of Ceylonese honors in 1956 by S. W. R. D. Bandaranaike. The minor headman positions were retained, surviving well into the 1970s when the post of Vidane was replaced with the transferable post of Grama Niladhari (Village Officer).
United States.
United States federal law enforcement officers include the following:
Arizona.
Arizona Revised Statutes defines a peace officer in Title 13, Section 105, as "any person vested by law with a duty to maintain public order and make arrests and includes a constable." Title 1, Section 215(27) enumerates those who are peace officers in the State of Arizona. It includes:
Arizona Revised Statutes 41-1823 states that except for duly elected or appointed sheriffs and constables, and probation officers in the course of their duties, no person may exercise the authority or perform the duties of a peace officer unless he is certified by the Arizona peace officers standards and training board.
California.
Sections 830 through 831.7 of the California Penal Code
list persons who are considered peace officers within the State of California. Peace officers include, in addition to many others,
Most peace officers have jurisdiction throughout the state, but many have limited powers outside their political subdivisions. Some peace officers require special permission to carry firearms. Powers are often limited to the performance of peace officers' primary duties (usually, enforcement of specific laws within their political subdivision); however, most have power of arrest anywhere in the state for any public offense
that poses an immediate danger to a person or property.
A private person (i.e., ordinary citizen) may arrest another person for an offense committed in the arresting person's presence, or if the other person has committed a felony whether or not in the arresting person's presence (Penal Code § 837), though such an arrest when an offense has not occurred leaves a private person open to criminal prosecution and civil liability for false arrest. A peace officer may:
Persons are required to comply with certain instructions given by a peace officer, and certain acts (e.g., battery) committed against a peace officer carry more severe penalties than the same acts against a private person. It is unlawful to resist, delay, or obstruct a peace officer in the course of the officer's duties (Penal Code § 148[a][1]).
New York State.
New York State grants peace officers very specific powers under NYS Criminal Procedure Law, that they may make warrantless arrests, use physical and deadly force, and issue summonses under section 2.20 of that law.
There is a full list of peace officers under Section 2.10 of that law. Below are some examples.
Texas.
Texas Statutes, Code of Criminal Procedure, Art. 2.12, provides:
References.
Notes