我正在嘗試更改 chromeos 設備的狀態。我的“獲取”請求用于從序列號獲取設備 ID。但是,我無法how to pass the payload在 golang google sdk/api 中弄清楚,因為它是一個“發布”請求。在這種情況下,有效負載是 Action。(取消配置、禁用、重新啟用、pre_provisioned_disable、pre_provisioned_reenable)和 deprovisionReason(如果操作是取消配置)。https://developers.google.com/admin-sdk/directory/reference/rest/v1/chromeosdevices/action#ChromeOsDeviceAction出現錯誤cannot use deviceAction (variable of type map[string]string) as *admin.ChromeOsDeviceAction value in argument to srv.Chromeosdevices.ActioncompilerIncompatibleAssign
Golang 和 google api - 使用 oauth 更新設備狀態時發布請求語法
慕桂英4014372
2023-03-15 14:57:07