使用 Go 客户端库创建实例组时无法定义网络?

Can't define Network when creating Instance Group with Go client library?

通过 GCP Console 创建非托管实例组时,我可以看到 REST 请求为:

POST https://www.googleapis.com/compute/v1/projects/my-project/zones/us-east1-d/instanceGroups
{
  "name": "ig-web",
  "network": "https://www.googleapis.com/compute/v1/projects/my-project/global/networks/nomad-network",
  "namedPorts": [
    {
      "name": "http",
      "port": 11080
    }
  ]
}

但是according to the API docs and client library generated code,没办法设置networkURL.

有人愿意澄清一下吗?

这实际上是一个文档错误。以下将起作用:

op, err := gce.service.InstanceGroups.Insert(projectID, zone, &compute.InstanceGroup{
        Name:       name,
        NamedPorts: namedPorts,
        Network:    networkURL}).Do()