简体   繁体   English

GCP 通过 Rest API 或 python 模块启用服务/api

[英]GCP enable services/apis via Rest API or python module

How can I enable/disable APIs/Services in Google Cloud Project via Restful APIs or python?如何通过 Restful API 或 python 在 Google Cloud Project 中启用/禁用 API/服务?

For example, I want to enable following API/Service in a project.例如,我想在项目中启用以下 API/服务。

https://console.developers.google.com/apis/api/iam.googleapis.com/overview?project= https://console.developers.google.com/apis/api/iam.googleapis.com/overview?project=

I see this is a super old thread, but I figure since it comes up in a search, I should go ahead and respond.我看到这是一个超级旧的线程,但我想既然它出现在搜索中,我应该提前 go 并回复。

You can programmatically enable or disable a GCP service using the Service Usage API. There are also methods for batch operations and querying service state. See the link below to the documentation.您可以使用服务使用 API 以编程方式启用或禁用 GCP 服务。还有批量操作和查询服务 state 的方法。请参阅下面的文档链接。

https://cloud.google.com/service-usage/docs/reference/rest/v1/services https://cloud.google.com/service-usage/docs/reference/rest/v1/services

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure 通过 Rest API 或 python 模块(MS Graph)按名称或 email 地址搜索用户、组或服务原则? - Azure search for user, groups, or service principle by name or email address via Rest API or python module (MS Graph)? 授权 REST API 调用 GCP - Authorizing REST API calls to GCP 将 GCP 服务与 python 和代理一起使用 - Use GCP services with python and proxy GCP Vertex AI 已启用时“启用必要的 API” - GCP Vertex AI "Enable necessary APIs" when already enabled HTTP API 使您能够以比 REST API 更低的延迟和更低的成本创建 RESTful API - HTTP APIs enable you to create RESTful APIs with lower latency and lower cost than REST APIs GCP Vertex AI Rest API 用于笔记本执行 - GCP Vertex AI Rest API for Notebook Execution 通过服务帐户使用 serviceusage API 启用 API - Enable APIs using serviceusage API with a service account GCP pubsub 从第三个 API REST 拉取 - GCP pubsub pull from a third API REST 通过 Python 列出 GCP 存储桶位置 - List GCP Bucket Locations Via Python 如何通过 Python API 使用启动脚本启动 GCP Compute Engine VM? - How to launch GCP Compute Engine VM with Startup Script via Python API?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM