本文介绍了通过gcloud预览应用删除模块时的403状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我目前正在使用使用服务帐户gcloud preview app modules delete <module_name> --version <version_to_delete>
来清理托管虚拟机的旧模块版本.直到上周为止,这种方法一直有效.我现在收到下面的错误.
I currently usegcloud preview app modules delete <module_name> --version <version_to_delete>
with a service account to clean up old module versions for managed vms. This has been working great up until last week. I am now getting the error below.
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
设置服务帐户
- Using my personal account from google allows me to delete module versions
- I currently set the service account with
gcloud auth activate-service-account <some_id>@developer.gserviceaccount.com --key-file gcloud.json
推荐答案
您必须在开发人员控制台中启用"App Engine Admin API",才能使用服务帐户删除模块:
You must enable the "App Engine Admin API" in the Developers Console in order to delete modules using a service account:
- 转到 https://console.developers.google.com/
- 导航到 API和身份验证> API
- 找到并启用"App Engine Admin API"
- Go to https://console.developers.google.com/
- Navigate to APIs and auth > APIs
- Find and enable "App Engine Admin API"
这篇关于通过gcloud预览应用删除模块时的403状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!