问题
I currently use
gcloud 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"}]}]]
More specifics:
- 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
回答1:
You must enable the "App Engine Admin API" in the Developers Console in order to delete modules using a service account:
- Go to https://console.developers.google.com/
- Navigate to APIs and auth > APIs
- Find and enable "App Engine Admin API"
来源:https://stackoverflow.com/questions/32984986/403-status-on-deleting-modules-through-gcloud-preview-app