Method: providers.vehicles.update
Stay organized with collections
Save and categorize content based on your preferences.
Writes updated vehicle data to the Fleet Engine.
When updating a Vehicle
, the following fields cannot be updated since they are managed by the server:
currentTrips
availableCapacity
currentRouteSegmentVersion
waypointsVersion
The vehicle name
also cannot be updated.
If the attributes
field is updated, all the vehicle's attributes are replaced with the attributes provided in the request. If you want to update only some attributes, see the vehicles.updateAttributes
method. Likewise, the waypoints
field can be updated, but must contain all the waypoints currently on the vehicle, and no other waypoints.
HTTP request
PUT https://fleetengine.googleapis.com/v1/{name=providers/*/vehicles/*}
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters |
name |
string
Required. Must be in the format providers/{provider}/vehicles/{vehicle} . The {provider} must be the Project ID (for example, sample-cloud-project ) of the Google Cloud Project of which the service account making this call is a member.
|
Query parameters
Parameters |
header |
object (RequestHeader )
The standard Fleet Engine request header.
|
updateMask |
string (FieldMask format)
Required. A field mask indicating which fields of the Vehicle to update. At least one field name must be provided. This is a comma-separated list of fully qualified names of fields. Example: "user.displayName,photo" .
|
Request body
The request body contains an instance of Vehicle
.
Response body
If successful, the response body contains an instance of Vehicle
.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-18 UTC."],[[["Updates vehicle data in Fleet Engine, replacing existing data with the provided information."],["Certain fields like `currentTrips`, `availableCapacity`, and `name` cannot be updated using this method."],["When updating `attributes` or `waypoints`, the entire field is replaced; use `vehicles.updateAttributes` for partial attribute updates."],["The request must specify the vehicle's provider and ID, along with a field mask indicating the fields to be updated."],["A successful response returns the updated `Vehicle` object."]]],[]]