[英]How to list GCP projects with a particular API enabled
Is it possible to take aa list of all projects in a organization that uses a specific API, eg Cumpute Engine API?是否可以列出使用特定 API 的组织中的所有项目,例如 Cumpute Engine API?
Cloud Asset Inventory should help. Cloud Asset Inventory应该有所帮助。
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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.