I was wondering if there is a way to fetch the actual quota usage of a Google Cloud Service via the Google API like the information provided in the Cloud Console.
As far as I've researched there are multiple APIs regarding this topic:
Service Usage API
This API only lists services and allows enabling/disabling services.
Cloud Quotas API
These endpoints only allow viewing (and modifying) the Quota limits. Going by the screenshot above, values 50k, 1.8m, 180k.
Cloud Metrics API
Would be the closest candidate but haven't figured out how to configure the permissions yet (Permission monitoring.monitoredResourceDescriptors.list denied
) and it looks like those endpoints would only deliver data from their infrastructure products like Compute, Storage, Data Analytics, etc.
Did anyone manage to get actual usage metrics / remaining quota counts for a Google Cloud service - here especially for the YouTube Data API?Unfortunately Google also doesn't send any Rate-Limit headers with their API responses.
Thanks!!