How to get Credits usage expenses data through GCP python SDK

Hi Everyone

Iam trying to get Credits usage expanses and Credits data in GCP through Python SDK, but I didn't get any responce.

can any one know how to get credits data through python SDK API

 

1 1 46
1 REPLY 1

Hi @thirupathi 

Welcome to Google Cloud Community!

As of now, there is no available API on the documentation to display cost table for billing. Be informed that there is already a feature request for this.

Alternatively, you may want to try exporting cloud billing cost tables to bigquery and programatically create a python code/app to retrieve the cost table you need. You may see this link for example code to use bigquery. Using this alternative, be aware of existing limitations that you may encounter on the process.

I hope this information is helpful.

If you need further assistance, you can always file a ticket on our support team.