How can I get the billing for a VM Instance in GCP?

好久不见. 提交于 2021-02-08 05:01:58

问题


I have a project in Google Cloud, where I have multiple instances running, and I have a billing account for the organisation. But I want to make a VM instance, say vm-01 for couple of hours then it will be deleted. I want to get the exact cost that vm-01 incurred during it's period using the API calls. Is it possible?


回答1:


In your GCP Web Console,

  1. go to Billing page
  2. go to Billing export section
  3. you could either export the detail billing to BigQuery or File
  4. you could search the billing item in the export
    • https://cloud.google.com/billing/docs/how-to/bq-examples
    • https://cloud.google.com/billing/docs/how-to/export-data-file

And suggest you to use Label to label the resource, e.g. Compute Engine, for better resource management.



来源:https://stackoverflow.com/questions/51380014/how-can-i-get-the-billing-for-a-vm-instance-in-gcp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!