In the ritsuryo system (a system of centralized government based on the ritsuryo code), the role of the Shogun is defined in Article 24 of the Gunboryo (the Statute on Military Defense).
日本の律令制では、軍防令24条に将軍の規定がある。