My current Google Cloud billing dashboard shows me the charges for this month, for all my Google Services: Storage, BigQuery, etc.
How do I get this information programmatically? The Cloud Billing API only gives me billing details, but that is not what I want.
I also tried looking into Google Storage for the billing file they periodically update, but it contains information for 2 days ago only.
What should I do?
If you enable 'Billing Export' in the 'Billing' tab, a new JSON or CSV file will be exported everyday into Google Cloud Storage. It will have that days' usage and cost information. I have files there since the beginning of my project.