There have been several entities known as the Kingdom of Italy.
The various Barbarian rulers of Italy after the end of the Western Empire in 476 (including Odoacer, the Ostrogoths and the Lombards) sometimes called their state the Kingdom of Italy.
With the end of the Lombard Kingdom in 772, its territory, along with the former Byzantine possessions in Northern Italy became a new Kingdom of Italy, sometimes called the Regnum Italicum or, in Italian, the Regno, which formed one of the constituent parts of the Holy Roman Empire. The Regno continued to exist, at least in theory, until the end of the Empire in 1806 (or, at least, until the Imperial reorganization of 1803), and the Archbishop of Cologne held the honorific title of Archchancellor of Italy, but the Imperial rule in Italy lost most of its force after the fall of the Hohenstaufen in the mid-13th century, and ceased to have any real meaning by the Treaty of Westphalia in 1648. The Regno originally consisted of all of Italy from the Papal possessions north, but eventually the Papal States as well as the mainland territories of the Republic of Venice, were considered to be excluded.
In 1805 the Italian Republic was transformed into a Kingdom of Italy, with Napoleon as King. Napoleon's stepson Eugène de Beauharnais acted as Viceroy until the fall of Napoleon in 1814. The Kingdom was supposed to pass to a younger son of Napoleon, failing which, Eugène was to succeed.