'Good practices regarding Google APIs quota usage count in a multi-project setup

I have a general question regarding Google APIs quota usage and how it's counted towards the limits.

I am currently working with a multi-project setup (let's say project A and B) and some applications deployed in A consume ressources in B (GCS, BigQuery)

Is there any good practices around setting quota_project_id exposed by client libraries? (applications are written using Python 3)

From what I understood, if an app deployed in A access a ressource in B (e.g. read a table from a BigQuery dataset), the quota that will be impacted is the one from project A. Am I right?

It's possible to play with the quota_project_id by changing either the project parameter from the Client instance: https://googleapis.dev/python/storage/latest/client.html

Or by passing a custom ClientOptions: https://googleapis.dev/python/google-api-core/latest/client_options.html#google.api_core.client_options.ClientOptions



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source