Is there a way to get current usage/billing report/metric via Client SDK or API?
Example my app is using Cloud Speech API and would like to see how much I've incurred in costs on the app itself without having to login to console everytime.
I am basically exploring the nuget
package Google.Apis.Cloudbilling.v1
but lack of much documentation is leaving me perplex.
What I have tried so far:
var service = new Google.Apis.Cloudbilling.v1.CloudbillingService();
Google.Apis.Cloudbilling.v1.ProjectsResource.GetBillingInfoRequest request = service.Projects.GetBillingInfo("projects/my-project-123");
Google.Apis.Cloudbilling.v1.Data.ProjectBillingInfo response = request.Execute();
I have an GOOGLE_APPLICATION_CREDENTIALS
set globally and enabled billing api via the console.