How can I check (inside Java code) if a VM instance on google compute engine is running or not? Thank you in advance.
Asked
Active
Viewed 101 times
1 Answers
2
You can use this method get
and then check status
in the response.
NOTE The documentation page includes a way to "Try this API". If you have an existing project containing a VM instance, you can populate the form for your project and instance to see how it works.
See this example:
Although it doesn't use instances.get
, it does use instances.[insert|list|delete]
and it should give you a good template.

DazWilkin
- 32,823
- 5
- 47
- 88