이 섹션의 문서에서는 Fleet Engine에서 차량을 만들고 관리하는 방법을 설명합니다. Fleet Engine 서버 환경에서 차량을 만들어 실제 운영의 실제 차량을 반영합니다. 또한 Fleet Engine 차량은 차량 할당 및 라우팅에 사용하는 백엔드 시스템에서 사용되는 차량과 일치해야 합니다.
gRPC 또는 REST를 사용하여 차량 리소스를 만드는 데 create 메서드를 사용합니다.
이 가이드의 필드 이름은 편의를 위해 gRPC 표기법을 사용합니다.
출력 전용 필드. 서비스에서 다른 메서드의 출력으로 설정되며 직접 설정할 수 없는 필드입니다. 이 유형의 중요한 필드는 name 필드입니다. Google AIP의 사용자 지정 ID 안내에 따라 Fleet Engine은 차량의 name 필드에 제공된 값을 무시합니다. 이러한 필드에 값을 제공하면 Fleet Engine에서 오류를 반환합니다.
필수 입력란 온디맨드 이동 서비스에서 생성된 차량은 생성 시 특정 필드를 설정해야 합니다. 예약된 작업 서비스에서 생성된 차량에는 필수 차량 리소스 필드가 없습니다.
선택적 필드 두 서비스 모두 생성 시 또는 그 후에 설정할 수 있는 필드가 있습니다. 이러한 내용은 사용하는 서비스의 해당 참조 가이드에서 확인할 수 있습니다.
차량 이름 (출력 전용)
name 필드는 주문형 이동과 예약된 작업 서비스에서 정확히 동일합니다. Fleet Engine은 차량 생성 시 설정한 두 필드를 기반으로 차량을 만들 때 필드를 정의합니다.
상위: Google Cloud 프로젝트 ID와 연결된 문자열로, providers/{provider} 형식입니다. 여기서 {provider}는 Cloud 프로젝트의 ID입니다. 특정 프로젝트에 대해 생성하는 각 차량은 동일한 상위 경로를 갖습니다.
여기에서 참조하는 Cloud 프로젝트에는 사용하는 서비스의 Fleet Engine 서비스 계정 역할도 포함되어야 합니다. 이러한 서비스 계정 목록은 서비스 계정을 참고하세요. Fleet Engine은 여러 Google Cloud 프로젝트에서의 액세스를 지원하지 않습니다.
차량 ID. 차량 ID는 전체 차량에서 고유해야 하며 유효한 유니코드 문자열이어야 합니다. 차량의 리소스 ID입니다. 주문형 이동과 예약된 정류장 모두 이를 사용하여 이동 또는 작업을 완료하는 차량과 연결합니다.
리소스 호출에 사용되는 고유한 엔티티 식별자의 형식과 값은 Fleet Engine에 불투명합니다. 식별자에 운전자의 전화번호와 같은 개인 식별 정보 (PII)가 포함되지 않도록 합니다.
차량 재사용
차량이 특정 여정의 모든 정류장을 완료하면 Fleet Engine에서 7일 동안 재사용할 수 있습니다. 즉, 새 차량을 만들지 않고도 다음 영업일에 차량을 재사용할 수 있습니다. 차량을 재사용할 때마다 Fleet Engine에서 차량의 사용 가능 여부를 재설정하며 이때 7일 카운트다운이 새로 시작됩니다.
Fleet Engine에서 차량을 사용할 수 있도록 유지하는 데 권장되는 방법은 일정한 간격으로 위치를 업데이트하는 것입니다. Vehicle 항목의 다른 대부분의 필드를 업데이트해도 새 필드 값이 기존 값과 다른 경우 수명이 연장됩니다.
참고: device_settings과 같은 Vehicle 항목의 일부 필드는 Fleet Engine에서 유지되지 않는 순수한 디버그 정보입니다. 업데이트해도 Vehicle 항목의 수명이 연장되지는 않습니다.
시스템 분석을 개선하려면 매일 동일한 운전자-차량 ID 페어링을 재사용하는 것이 좋습니다. 이전 예약 정류장 또는 주문형 이동에 운전자와 연결된 동일한 차량 ID를 사용하여 이를 실행합니다.
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eFleet Engine enables the creation and management of virtual vehicles that mirror real-world vehicles for dispatch and routing purposes.\u003c/p\u003e\n"],["\u003cp\u003eVehicles are created using gRPC or REST methods, requiring a unique vehicle ID and Google Cloud project association for identification.\u003c/p\u003e\n"],["\u003cp\u003eVehicle resources have output-only, required, and optional fields, with the \u003ccode\u003ename\u003c/code\u003e field being generated by Fleet Engine based on project ID and vehicle ID.\u003c/p\u003e\n"],["\u003cp\u003eAuthenticated requests to Fleet Engine are necessary, using either the Authorization library for gRPC or JSON Web Tokens for REST.\u003c/p\u003e\n"],["\u003cp\u003eVehicles remain available for reuse for 7 days after completing an itinerary, and regular updates to vehicle location or other fields extend this availability.\u003c/p\u003e\n"]]],["Fleet Engine manages vehicles through creation and management within its server environment, mirroring real-world operations and backend systems. Creating vehicles involves using `CreateVehicleRequest` (gRPC) or `providers.vehicle.create` (REST) for on-demand trips and `CreateDeliveryVehicleRequest` or `providers.deliveryVehicles.create` for scheduled tasks. Requests include a parent (Google Cloud project ID), a unique vehicle ID, and a vehicle instance with required fields. Fleet Engine sets the vehicle `name` field. Vehicles can be reused for up to 7 days after completing stops, extendable by updating location or other fields.\n"],null,["For general information about how vehicles work in Fleet Engine, see the\nfollowing guides in the Fleet Engine essential section:\n\n- [What is Fleet Engine?](/maps/documentation/mobility/fleet-engine/essentials)\n- [Introduction to vehicles](/maps/documentation/mobility/fleet-engine/essentials/vehicles-intro)\n\nThe documentation in this section describes how to create and manage vehicles in\nFleet Engine. You create vehicles in the Fleet Engine server environment to\nmirror the actual vehicles in your real-world operation. Your Fleet Engine\nvehicles should also correspond to those used in your backend system that you\nuse for vehicle assignments and routing.\n\nYou use a create method to create a vehicle resource, either using gRPC or REST.\nThe field names in this guide use gRPC notation for simplicity. \n\nOn-demand trips\n\n- [`CreateVehicleRequest`](/maps/documentation/mobility/fleet-engine/reference/trips/rpc/maps.fleetengine.v1#maps.fleetengine.v1.CreateVehicleRequest) (gRPC)\n- [`providers.vehicle.create`](/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/providers.vehicles/create) (REST)\n- `Vehicle` resource ([REST](/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/providers.vehicles), [gRPC](/maps/documentation/mobility/fleet-engine/reference/trips/rpc/maps.fleetengine.v1#maps.fleetengine.v1.Vehicle))\n\nScheduled tasks\n\n- [`CreateDeliveryVehicleRequest`](/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest) (gRPC)\n- [`providers.deliveryVehicles.create`](/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/providers.deliveryVehicles/create) (REST)\n- `DeliveryVehicle` ([REST](/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/providers.deliveryVehicles), [gRPC](/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicle))\n| **Note:** The request messages and resource fields for the two Fleet Engine vehicle resources are largely parallel, even though some names vary between the two.\n\nVehicle requests\n\nFor both on-demand and scheduled task capabilities, you create and update a\nvehicle by issuing a request message with fields, summarized as follows:\n\n1. **The parent**: a string associated with your Google Cloud project ID, used to populate the name field of the vehicle instance.\n2. **The ID for the vehicle** : a unique string used to populate the `name`\n field of the vehicle.\n\n | **Note:** Vehicle ID strings have certain character restrictions. Avoid auto-incrementing IDs and ensure they contain no personally-identifiable information. For details on character restrictions, see the vehicle ID field for [CreateVehicleRequest](/maps/documentation/mobility/fleet-engine/reference/trips/rpc/maps.fleetengine.v1#maps.fleetengine.v1.CreateVehicleRequest) or [CreateDeliveryVehicleRequest](/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/issue-jwt).\n3. **A vehicle instance** with its required fields. These fields depend on the\n Fleet Engine capability you use.\n\nThe information in the request body varies with the nature of the request. See\nthose details under their respective guides.\n\nAuthentication and authorization tokens\n\nRequests to Fleet Engine must also provide the correct access credentials.\nThe examples in this guide have the following assumptions:\n\n- gRPC examples assume the use of the [Authorization library](/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/issue-jwt#use-authorization) for Java.\n- REST examples illustrate an HTTP request header, which must contain the field `Authorization` with a value of `Bearer \u003ctoken\u003e` where `\u003ctoken\u003e` is a [JSON Web Token you issue](/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/issue-jwt).\n\nFor more details, see the [Set up Fleet Engine](/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet) guides.\n\nVehicle resource fields\n\nA vehicle resource has the following kinds of fields:\n\n- **Output only fields** . Fields that are set by the service as an output of another method and **cannot be directly set** . An important field of this type is the `name` field. Fleet Engine ignores any supplied value for the `name` field of the vehicle per guidance from Google AIP for [user-specified\n IDs](https://google.aip.dev/133#user-specified-ids). If you supply values for these fields, Fleet Engine returns an error.\n- **Required fields**. Vehicles created in the on-demand trip service require that certain fields be set on creation. Vehicles created in the scheduled tasks service have no required vehicle resource fields.\n- **Optional fields**. Both services have fields which you can set on creation or afterwards. These can be found in the respective reference guide for the service you use.\n\nVehicle name (output only)\n\nThe `name` field is exactly the same for on-demand trips and scheduled task\nservices. Fleet Engine defines the field when you create the vehicle, based on\ntwo fields you set at vehicle creation:\n\n- **The parent** : a string associated with your Google Cloud project ID of the\n form `providers/{provider}` where `{provider}` is the ID of your Cloud\n project. Each vehicle you create for a given project will have the same\n parent path.\n\n The Cloud project you reference here must also contain the Fleet Engine\n service account roles for the service you use. See [Service Accounts](/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/service-accounts) for\n a list of those service accounts. Fleet Engine does not support access from\n multiple Google Cloud projects.\n- **The ID for the vehicle** , which must be unique across all vehicles in your\n fleet and be a valid Unicode string. This is the *resource ID* for the\n vehicle. Both on-demand trips and scheduled stops use this to associate a\n trip or a task with the vehicle that completes it.\n\nIn Google Cloud-based services, all APIs must represent resources as strings.\nSee [Resource naming in Fleet Engine](/maps/documentation/mobility/fleet-engine/essentials#resource-naming) for more details.\n\nUnique entity identifiers\n\nThe format and value of the unique entity identifiers used in resource calls are\nopaque to Fleet Engine. Make sure that the identifier does not contain any\npersonally-identifiable information (PII), such as the driver's phone number.\n\nVehicle re-use\n\nAfter a vehicle completes all stops for a given itinerary, it remains available\nfor re-use in Fleet Engine for 7 days, which means you can reuse a vehicle on\nsubsequent business days without having to create a new one. Each time you\nreuse a vehicle, Fleet Engine resets its availability, at which point the\n7-day countdown begins anew.\n\nThe recommended approach to keep a vehicle available in Fleet Engine is to\nupdate its location at regular intervals. Updates to most other fields in the\n`Vehicle` entity will also extend its life, provided that the new field value is\ndifferent from the existing one.\n\nNOTE: Some fields on `Vehicle` entity like `device_settings` are purely debug\ninformation that are not persisted by Fleet Engine. Updating them does not\nextend the life of the `Vehicle` entity.\n\nFor improved system analytics, it's best to re-use the same driver-vehicle ID\npairing from day to day. Do this by using the same vehicle ID associated with\nthe driver for previous scheduled stops or on-demand trips.\n\nWhat's next\n\n- [Create a vehicle for on-demand trips](/maps/documentation/mobility/fleet-engine/essentials/vehicles/on-demand-create-vehicle)\n- [Create a vehicle for scheduled tasks](/maps/documentation/mobility/fleet-engine/essentials/vehicles/scheduled-tasks-create-vehicle)"]]