I am trying to start a Google Compute instance with the Google API Python Client Library. This is so that a cheap instance (running on a single core) can periodically start and stop a more expensive instance (with many cores) periodically, to keep costs down.
I have successfully installed the different components and run Google's example script create_instance.py (which creates an instances, runs a startup script, and deletes the instance). Inspecting the PyDoc reference for the Compute Engine API, and cross-referencing how the other instances() functions work in the create_instance.py example, I would expect the start instance command to be:
python compute.instances().start(project=*, zone=*, instance=*).execute()
The above command gives me the error "An expression was expected after '('. at line:1 char:34" - this is the first parenthesis.
a. What have I done wrong?
b. Is using the Google API with Python a good way to start instances from other instances, programmatically?