gcloud.compute.instances.update无法识别的参数“--deletion-protection”

问题描述 投票:0回答:1

我在Google Cloud Engine上设置了一键式LAMP堆栈,并创建了一个我想要的protect against accidental deletion虚拟机实例

但是,每当我尝试使用gcloud命令行工具运行命令时,我都会收到以下错误:

ERROR: (gcloud.compute.instances.update) unrecognized arguments: --deletion-protection

有没有人有这个工作?文档中有错误吗?

任何帮助将不胜感激,

谢谢!

google-cloud-platform google-compute-engine google-cloud-sdk
1个回答
1
投票

你能发布你正在运行的确切命令吗?因为我在文档中尝试了两个命令,在这两种情况下我都成功设置了保护:

gcloud compute instances create new-instance --deletion-protection

gcloud compute instances update instance-name --deletion-protection

另一方面,这是您正在使用的Google SDK版本(通过gcloud version查看)?我的是“Google Cloud SDK 183.0.0”

您可以考虑更新它并重试:

gcloud components update
© www.soinside.com 2019 - 2024. All rights reserved.