Question: What country was the spouse of Caroline Amalie of Schleswig-Holstein-Sonderburg-Augustenburg king of before he was the King of Denmark?

Context articles: Christian VIII of Denmark
Princess Amalie of Saxony
Princess Amalie of Hohenzollern-Sigmaringen
Caroline Amalie of Augustenburg
Countess Caroline of Erbach-Fürstenau
Wilhelm Herman Barth
Princess Thyra of Denmark (1880–1945)
Philippa of England
Caroline Thielo
Ingeborg Christiane Rosenørn

Christian VIII (18 September 1786 – 20 January 1848) was the King of Denmark from 1839 to 1848 and, as Christian Frederick, King of Norway in 1814.
Amalie Marie Friederike Auguste (10 August 1794 – 18 September 1870), Princess of Saxony, full name Maria Amalia Friederike Augusta Karolina Ludovica Josepha Aloysia Anna Nepomucena Philippina Vincentia Franziska de Paula Franziska de Chantal, was a German composer writing under the pen name "A. Serena", and a dramatist under the name "Amalie Heiter".
 She was the daughter of Prince Maximilian of Saxony and Princess Carolina of Parma.
 She was the granddaughter of Frederick Christian, Elector of Saxony; niece of Frederick Augustus I, King of Saxony and Anthony, King of Saxony; sister of Frederick Augustus II, King of Saxony and John, King of Saxony; and aunt of Albert, King of Saxony and George, King of Saxony.
Princess "Amalie" Antoinette Karoline Adrienne of Hohenzollern-Sigmaringen, German: "Amalie Antoinette Karoline Adrienne, Prinzessin von Hohenzollern-Sigmaringen" (30 April 1815, Sigmaringen, Principality of Hohenzollern-Sigmaringen – 14 January 1841, Sigmaringen, Principality of Hohenzollern-Sigmaringen) was a member of the House of Hohenzollern-Sigmaringen and a Princess of Hohenzollern-Sigmaringen by birth.
 Through her marriage to Prince Eduard of Saxe-Altenburg, Amalie was also a member of the House of Saxe-Altenburg and Princess of Saxe-Altenburg.
 Marie Antoinette was a grand-niece of Joachim Murat, King of the Two Sicilies from 1808 to 1815 and a brother-in-law of Napoleon Bonaparte, through marriage to Napoleon's youngest sister, Caroline Bonaparte.
Caroline Amalie of Schleswig-Holstein-Sonderburg-Augustenburg (28 June 1796 – 9 March 1881) was queen consort of Denmark as the second spouse of King Christian VIII between 1839 and 1848.
Countess Caroline Amalie of Erbach-Fürstenau (born: 29 September 1700 at Fürstenau Castle, Michelstadt – died: 7 May 1758 in Hildburghausen), was a countess of Erbach-Furstenau and by marriage Duchess of Saxe-Hildburghausen.
 From 1745 to 1748, she was also Regent of Saxe-Hildburghausen.
He was born in Copenhagen, the son of carpenter Friderich Wilhelm Barth (born in Berlin in 1787) and Eleonora Elisabeth, née Schultz.
 In 1834 he married Caroline Amalie Marquard, daughter of the manager Johan Hendrik Marquard.
Princess Thyra of Denmark and Iceland (Thyra Louise Caroline Amalie Augusta Elisabeth; Copenhagen, 14 March 1880 – Copenhagen, 2 November 1945) was the sixth child and third daughter of Frederick VIII of Denmark and his wife, Princess Louise of Sweden and Norway.
Philippa of England (4 June 1394 – 5 January 1430), also known as Philippa of Lancaster, was Queen of Denmark, Sweden, and Norway from 1406 to 1430 by marriage to Eric of Pomerania.
 She was the daughter of King Henry IV of England by his first spouse Mary de Bohun and the younger sister of King Henry V.
 Queen Philippa participated significantly in state affairs during the reign of her spouse, and served as regent of Denmark from 1423 to 1425.
Caroline Amalie Thielo (March 1, 1735 – February 5, 1754) was a Danish actress, one of her country's first professional native female actors, and said to be the first actress ever employed at the Royal Danish Theatre in Copenhagen.
 She was very popular in the mid 18th century, and was also employed as a translator of plays for the theatre.
Ingeborg Christiane Rosenörn (1784-1859) was a Danish courtier and philanthropist; Overhofmesterinde to the Danish queen, Caroline Amalie of Augustenburg from 1845 to 1859.