Get Instance Images name with the gcloud python api

522 views
Skip to first unread message

Romaric Tavenard

unread,
Jan 12, 2019, 9:53:43 AM1/12/19
to gce-discussion

How can I retrieve the image name of an instance thanks to the gcloud compute engine API in python?

when I list my instances with

compute.instances().list(project=project, zone=zone , filter ='status eq '+ instance_status).execute()

The response doesn't give me the instance image name (debian-9).


thanks in advance

Sunny J (Google Cloud Support)

unread,
Jan 12, 2019, 12:58:28 PM1/12/19
to gce-dis...@googlegroups.com

Hello Romaric,


Thank you for the post.


The following article on "Using gcloud to get Google Cloud Platform data you need" maybe helpful with your question. However, the Google Group forum is intended for discussion about GCE Products rather than troubleshooting of specific issues.


To get the most out of your interactions, we recommend you ask specific technical questions like "how do I…" or "what does this error mean?" on StackOverflow or ServerFault tagged with [google-cloud-platform] for more visibility.


Furthermore, you may also see the main Community Support page for a list of the tags we monitor. On Community Help Center  on StackOverflow and ServerFault for information on how to ask a good question.


I hope this information is helpful.


Thank you for using Google Cloud Platform Services.


Reply all
Reply to author
Forward
0 new messages