deterrent_example
1. [ noun ] punishment intended as a warning to others
Synonyms: lesson example object_lesson
Examples:

"they decided to make an example of him"

Related terms: admonition