I need to get metadata for VM and disk like Read/Write IOPS per instance. Can anyone suggests Which API should I use to retrieve the same?
Hi @abhi27,
Welcome to the Google Cloud Community!
To get the metadata of an instance, you can use the Compute Engine API's instances.get()
method [1]. This method returns information about the instance, including its metadata, metadata kind, and metadata fingerprint. For a complete list of output fields, please see the official documentation.
You can use the diskTypes()
[2] and disks()
[3] methods to view information about an instance's disk, including the provisioned IOPS and disk type.
I hope this is helpful! Thank you.
Best,
Lawrence
[1]. https://cloud.google.com/compute/docs/reference/rest/v1/instances/get
[2]. https://cloud.google.com/compute/docs/reference/rest/v1/diskTypes
[3]. https://cloud.google.com/compute/docs/reference/rest/v1/disks
Hi @lawrencenelson , I want to fetch max iops and throughput of each kind of disk. Kindly suggest me solution for the same
Hi @abhi27 , I'm also working on finding a way to collect the maximum IOPS and throughput for each disk. Have you discovered any way for this?