Add the water, apple cider vinegar, sugar, kosher salt, red onion, garlic, bay leaves, thyme, rosemary, and black peppercorns to a medium-sized pot. Bring to a boil over medium-high heat, then reduce the heat to a gentle simmer. Stir until the sugar and salt are dissolved.