Reputation: 31
Is it possible to take a a list of all projects in a organization that uses a specific API, e.g Cumpute Engine API?
Upvotes: 3
Views: 944
Reputation: 40061
Cloud Asset Inventory should help.
It's a slightly confusing interface but try:
ORG=[[YOUR-ORG-ID]]
gcloud asset search-all-resources \
--scope=organizations/${ORG} \
--asset-types=serviceusage.googleapis.com/Service \
--query=name:compute.googleapis.com
Upvotes: 7