Minimizing a convex function

Please help me in writing the cvx code for minimizing:
f(x) = (|a’*x|-1)^2 where a and x are in R^n

Please show us your proof of convexity.