我无法在 Javascript 中为已停止的实例设置机器类型。我以为我发送错误,但后来进入 API Playground 自动尝试,它仍然给出相同的错误。
Playground 就在那里:
https://cloud.google.com/compute/docs/reference/latest/instances/setMachineType
机器类型有(我尝试了多种类型):
https://cloud.google.com/compute/docs/machine-types
我做错了什么吗?
最佳答案
根据the docs ,机器类型是包含区域的部分 URL,例如zones/us-west1-c/machineTypes/f1-micro
关于google-cloud-platform - Google Cloud API : Invalid value for field 'machineType' : 'f1-micro' . URL 格式错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46202410/