Vex is the capital city of the district of Hérens in the canton of Valais in Switzerland.