Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

SDK or API to get all instances processor manufacturer

I need GCP SDK or API to get all instances processor manufacturer

0 3 131
3 REPLIES 3

Hello,

Unfortunately, the Google Compute Engine API doesn't directly expose the processor manufacturer as a field in the instance metadata.

Regards,
Jai Ade

If you are looking for cpuPlatform details, you may try the python

from google.cloud import compute_v1

compute_client = compute_v1.InstancesClient()

instances_records = compute_client.list(project="beat-the-load-balancer", zone="asia-northeast1-c")

for each in instances_records:
    print((each.name, each.cpu_platform))

You can check https://cloud.google.com/docs/samples for more code samples.

Cloud Commands


gcloud compute instances list --format="value(name, zone)" | while read instance_name zone; do echo "================="; gcloud compute instances describe "$instance_name" --zone="$zone" --format="yaml(name,cpuPlatform)";
done



Hello,

Thank you for your engagement regarding this issue. We haven’t heard back from you regarding this issue for sometime now. Hence, I'm going to close this issue which will no longer be monitored. However, if you have any new issues, Please don’t hesitate to create a new issue. We will be happy to assist you on the same.

Regards,
Jai Ade