update api version

I've updated the api version to `2012-07-01` and also make it as a configuration variable.