  The extraordinary energetic activity of magnetars is usually explained in
terms of dissipation of a huge internal magnetic field of the order of
$10^{15-16}$G. How such a strong magnetic field can originate during the
formation of a neutron star is still subject of active research. An important
role can be played by fast rotation: if magnetars are born as millisecond
rotators dynamo mechanisms may efficiently amplify the magnetic field inherited
from the progenitor star during the collapse. In this case, the combination of
rapid rotation and strong magnetic field determine the right physical condition
not only for the development of a powerful jet driven explosion, manifesting as
a gamma ray burst, but also for a copious gravitational waves emission. Strong
magnetic fields are indeed able to induce substantial quadrupolar deformations
in the star. In this paper we analyze the joint effect of rotation and
magnetization on the structure of a polytropic and axisymmetric neutron star,
within the ideal magneto-hydrodynamic regime. We will consider either purely
toroidal or purely poloidal magnetic field geometries. Through the sampling of
a large parameter space, we generalize previous results in literature,
inferring new quantitative relations that allow for a parametrization of the
induced deformation, that takes into account also the effects due to the
stellar compactness and the current distribution. Finally, in the case of
purely poloidal field, we also discuss how different prescriptions on the
surface charge distribution (a gauge freedom) modify the properties of the
surrounding electrosphere and its physical implications.

High Energy Astrophysical Phenomena;General Relativity and Quantum Cosmology