2015-12-16 65 views
0

當創建通過GCP控制檯的非託管實例組,我可以看到REST請求爲:使用Go客戶端庫創建實例組時無法定義網絡?

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 docsclient library generated code,一個人沒有辦法設置network URL。

任何關心澄清?

回答

0

這實際上是一個文檔錯誤。以下將起作用:

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