Can';使用Go客户端库创建实例组时是否定义网络?
通过GCP控制台创建非托管实例组时,我可以看到REST请求如下所示:Can';使用Go客户端库创建实例组时是否定义网络?,go,google-compute-engine,google-cloud-platform,Go,Google Compute Engine,Google Cloud Platform,通过GCP控制台创建非托管实例组时,我可以看到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-netw
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
}
]
}
但是,您无法设置网络
URL
有人想澄清一下吗?这实际上是一个文档错误。以下工作将起作用:
op, err := gce.service.InstanceGroups.Insert(projectID, zone, &compute.InstanceGroup{
Name: name,
NamedPorts: namedPorts,
Network: networkURL}).Do()