I try to manage API keys from Cloud Shell Editor to restore an API (autocreated by Firebase) that I deleted.
I try to run gcloud alpha services api-keys undelete BYuihiuYUIGyugIIHU... but i receive Error: ERROR: (gcloud.alpha.services.api-keys.undelete) NOT_FOUND: Method not found.
I try to run (for testing) gcloud alpha services api-keys list command but I receive error: ERROR: (gcloud.alpha.services.api-keys.list) Projects instance [PROJECT_ID] not found: Method not found.
What I'm wrong?
Thank you so much
It is probable that (for some reason), your Cloud Shell is not running the latest version of
gcloud(Cloud SDK). The latest version is328.0.0. My Cloud Shell is running327.0.0includes the alpha commands (see below) and the commands work for me.What is the result of the following in Cloud Shell?
gcloud versiongcloud components listdoes the list includegcloud Alpha Commands?I'm confident that
gcloud Alpha Commandsare installed (by default) on Cloud Shell and so suspect that, for some reason, you're running an outdated version of Cloud SDK.I'm unsure how you can install
gcloud Alpha Commandsunder Cloud Shell if the component isn't installed because usinggcloud commandswill error under Cloud Shell but it should (!) tell you whichapt-get installcommand you will need:I assumed it was not permitted (since Cloud Shell is managed) but it is possible to self-update Cloud SDK in Cloud Shell. The following update will again tell you that you can't run the command in Cloud Shell but, it should give you a set of
apt-get installcommands that you can use to perform the update:Here's a link to the release notes for Cloud SDK. It's not obvious from these notes when these methods were added.