Method: providers.vehicles.update
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
更新された車両データを Fleet Engine に書き込みます。
Vehicle
を更新するとき、次のフィールドはサーバーによって管理されるため、更新できません。
currentTrips
availableCapacity
currentRouteSegmentVersion
waypointsVersion
車両 name
も更新できません。
attributes
フィールドが更新されると、すべての車両属性がリクエストで指定された属性に置き換えられます。一部の属性のみを更新する場合は、vehicles.updateAttributes
メソッドをご覧ください。同様に、waypoints
フィールドも更新できますが、車両上に現在あるすべての地点を含み、他の地点は含まれていない必要があります。
HTTP リクエスト
PUT https://fleetengine.googleapis.com/v1/{name=providers/*/vehicles/*}
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
name |
string
必須。providers/{provider}/vehicles/{vehicle} の形式で指定してください。{provider} は、この呼び出しを行うサービス アカウントがメンバーになっている Google Cloud プロジェクトのプロジェクト ID(sample-cloud-project など)にする必要があります。
|
クエリ パラメータ
パラメータ |
header |
object (RequestHeader )
標準の Fleet Engine リクエスト ヘッダー。
|
updateMask |
string (FieldMask format)
必須。更新する Vehicle のフィールドを指定するフィールド マスク。少なくとも 1 つのフィールド名を指定する必要があります。 完全修飾フィールド名のカンマ区切りリスト。例: "user.displayName,photo" 。
|
リクエストの本文
リクエストの本文には Vehicle
のインスタンスが含まれます。
レスポンスの本文
成功した場合、レスポンスの本文には Vehicle
のインスタンスが含まれます。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-31 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-08-31 UTC。"],[[["\u003cp\u003eUpdates vehicle data in Fleet Engine, replacing existing data with the provided information.\u003c/p\u003e\n"],["\u003cp\u003eCertain fields like \u003ccode\u003ecurrentTrips\u003c/code\u003e, \u003ccode\u003eavailableCapacity\u003c/code\u003e, and \u003ccode\u003ename\u003c/code\u003e cannot be updated using this method.\u003c/p\u003e\n"],["\u003cp\u003eWhen updating \u003ccode\u003eattributes\u003c/code\u003e or \u003ccode\u003ewaypoints\u003c/code\u003e, the entire field is replaced; use \u003ccode\u003evehicles.updateAttributes\u003c/code\u003e for partial attribute updates.\u003c/p\u003e\n"],["\u003cp\u003eThe request must specify the vehicle's provider and ID, along with a field mask indicating the fields to be updated.\u003c/p\u003e\n"],["\u003cp\u003eA successful response returns the updated \u003ccode\u003eVehicle\u003c/code\u003e object.\u003c/p\u003e\n"]]],[],null,[]]