我目前使用
gcloud preview app modules delete <module_name> --version <version_to_delete>
使用服务帐户来清理托管虚拟机的旧模块版本。直到上周为止,这一直运作良好。我现在收到以下错误。
ERROR: (gcloud.preview.app.modules.delete) Error Response: [403] Project has not enabled the API. Please use Google Developers Console to activate the API for your project.
Details: [[{"@type": "type.googleapis.com/google.rpc.Help", "links": [{"description": "Google developer console API activation", "url": "https://console.developers.google.com/project/<project_id>/apiui/api"}]}]]
更多细节:
- 使用我的 Google 个人帐户可以删除模块版本
- 我目前将服务帐户设置为
gcloud auth activate-service-account <some_id>@developer.gserviceaccount.com --key-file gcloud.json
最佳答案
您必须在开发者控制台中启用“App Engine Admin API”才能使用服务帐户删除模块:
- 转到https://console.developers.google.com/
- 导航至 API 和身份验证 > API
- 查找并启用“App Engine Admin API”
关于gcloud - 通过 gcloud Preview 应用删除模块时出现 403 状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32984986/