Method: providers.vehicles.updateAttributes

部分更新車輛的屬性。系統只會更新要求中提及的屬性,其他屬性則「不會」變更。注意:在 vehicles.update 中有所不同,整個 attributes 欄位會由 UpdateVehicleRequest 中的欄位取代,而要求中沒有的屬性將會移除。

HTTP 要求

POST https://fleetengine.googleapis.com/v1/{name=providers/*/vehicles/*}:updateAttributes

這個網址使用 gRPC 轉碼語法。

路徑參數

參數
name

string

必要欄位。格式須為 providers/{provider}/vehicles/{vehicle}。提供者必須是 Google Cloud 專案的專案 ID (例如 sample-cloud-project),而此呼叫所屬的服務帳戶必須隸屬於該專案。

要求主體

要求主體的資料會採用以下結構:

JSON 表示法
{
  "header": {
    object (RequestHeader)
  },
  "attributes": [
    {
      object (VehicleAttribute)
    }
  ]
}
欄位
header

object (RequestHeader)

標準的 Fleet Engine 要求標頭。

attributes[]

object (VehicleAttribute)

必要欄位。要更新的車輛屬性。未提及的屬性不會遭到變更或移除。

回應主體

vehicles.updateAttributes 則回應訊息。

如果成功,回應主體即會包含具有以下結構的資料:

JSON 表示法
{
  "attributes": [
    {
      object (VehicleAttribute)
    }
  ]
}
欄位
attributes[]

object (VehicleAttribute)

必要欄位。更新後的完整車輛屬性清單,包括全新、經過修改和未修改的屬性。