تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يساعدك هذا الدليل في التأكّد من اكتمال عملية إعداد أذونات Fleet Engine، ومن إمكانية إنشاء مركبة تجريبية. يستخدم هذا الدليل
أداة سطر الأوامر gcloud لاختبار
توقيع الرمز المميّز للتفويض وإنشاء المركبات.
لإكمال هذه العملية، اتّبِع الخطوات التالية:
استبدِل الحقول أدناه بالبيانات التي أنشأتها كجزء من عملية الإعداد:
الحقل
الاستبدال بـ
PROJECT_ID
معرّف مشروعك على السحابة الإلكترونية
SERVICE_ACCOUNT_EMAIL_ADDRESS
عنوان البريد الإلكتروني لحساب الخدمة الذي أنشأته باستخدام دور المشرف لمزيد من التفاصيل، يُرجى الاطّلاع على
أدوار حساب خدمة التنقّل.
VEHICLE_ID
أو
DELIVERY_VEHICLE_ID
معرّف عشوائي للمركبة. يمكن أن يحتوي المعرّف على 64 حرفًا كحدّ أقصى.
استخدِم الأداة المساعدة gcloud لتسجيل الدخول إلى حساب Google Cloud وتحديد المشروع النشط على محطة العمل:
تاريخ التعديل الأخير: 2025-08-31 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-31 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThis guide provides instructions to verify your Fleet Engine authorization and create a trial vehicle using the \u003ccode\u003egcloud\u003c/code\u003e command line utility.\u003c/p\u003e\n"],["\u003cp\u003eYou will need your Cloud project ID, service account email address, and a unique vehicle ID to complete the verification process.\u003c/p\u003e\n"],["\u003cp\u003eThe process involves generating and signing a JWT, then using it to create a test vehicle via a \u003ccode\u003ecurl\u003c/code\u003e command.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful setup is indicated by the output displaying the name of the created vehicle (e.g., "providers/PROJECT_ID/vehicles/VEHICLE_ID").\u003c/p\u003e\n"],["\u003cp\u003eFleet Engine automatically purges inactive vehicles after 7 days, eliminating the need for manual deletion.\u003c/p\u003e\n"]]],[],null,["# Verify your setup\n\nThis guide helps you verify that your Fleet Engine authorization setup is\ncomplete, and that you can create a trial vehicle. This guide uses\n[the `gcloud` command line utility](https://cloud.google.com/sdk/gcloud) to test\nauthorization token signing and vehicle creation.\n\nTo complete this process, do the following:\n\n1. Replace the fields below with the data you created as part of the setup:\n\n| Field | Replace with |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| \u003cvar class=\"edit\" scope=\"PROJECT_ID\" translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e | Your Cloud project ID. |\n| \u003cvar class=\"edit\" scope=\"SERVICE_ACCOUNT_EMAIL_ADDRESS\" translate=\"no\"\u003eSERVICE_ACCOUNT_EMAIL_ADDRESS\u003c/var\u003e | The email address of a service account you've created with the Admin role. See [Mobility service account roles](/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/service-accounts#mobility_service_account_roles) for details. |\n| \u003cvar class=\"edit\" scope=\"VEHICLE_ID\" translate=\"no\"\u003eVEHICLE_ID\u003c/var\u003e **OR** \u003cvar class=\"edit\" scope=\"DELIVERY_VEHICLE_ID\" translate=\"no\"\u003eDELIVERY_VEHICLE_ID\u003c/var\u003e | A random ID for the vehicle. The ID can contain a maximum of 64 characters. |\n\n1. Use the `gcloud` utility to log into the Google Cloud account and set the\n active project on your workstation:\n\n gcloud auth login\n gcloud config set project \u003cvar label=\"project ID\" translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\n\n2. Create a JSON Web Token (JWT) claim for the vehicle creation:\n\n ### On-demand trips\n\n ```\n cat \u003e claim.jwt \u003c\u003c EOM\n {\n \"iss\": \"SERVICE_ACCOUNT_EMAIL_ADDRESS\",\n \"sub\": \"SERVICE_ACCOUNT_EMAIL_ADDRESS\",\n \"aud\": \"https://fleetengine.googleapis.com/\",\n \"iat\": $(date +%s),\n \"exp\": $((`date +%s` + 3600)),\n \"authorization\": {\n \"vehicleid\": \"VEHICLE_ID\"\n }\n }\n EOM\n \n ```\n\n ### Scheduled tasks\n\n ```\n cat \u003e claim.jwt \u003c\u003c EOM\n {\n \"iss\": \"SERVICE_ACCOUNT_EMAIL_ADDRESS\",\n \"sub\": \"SERVICE_ACCOUNT_EMAIL_ADDRESS\",\n \"aud\": \"https://fleetengine.googleapis.com/\",\n \"iat\": $(date +%s),\n \"exp\": $((`date +%s` + 3600)),\n \"authorization\": {\n \"deliveryvehicleid\": \"DELIVERY_VEHICLE_ID\"\n }\n }\n EOM\n \n ```\n3. Use `gcloud` to sign this JWT with the appropriate IAM permissions. :\n\n gcloud iam service-accounts sign-jwt claim.jwt output.jwt \\\n --iam-account=\u003cvar translate=\"no\"\u003eSERVICE_ACCOUNT_EMAIL_ADDRESS\u003c/var\u003e\n\n The signed JWT is stored in `output.jwt`.\n\n For details, see [Provide required permissions](https://cloud.google.com/iam/docs/create-short-lived-credentials-direct#permissions-access) and\n [the `gcloud` command line guide](https://cloud.google.com/sdk/gcloud/reference/beta/iam/service-accounts/sign-jwt) in the Google Cloud\n documentation.\n4. Use `curl` to create a test vehicle on Fleet Engine:\n\n ### On-demand trips\n\n ```\n curl -X POST \"https://fleetengine.googleapis.com/v1/providers/PROJECT_ID/vehicles?vehicleId=VEHICLE_ID\" \\\n -H \"Content-type: application/json\" \\\n -H \"Authorization: Bearer $(cat output.jwt)\" \\\n --data-binary @- \u003c\u003c EOM\n {\n \"name\": \"providers/PROJECT_ID/vehicles/VEHICLE_ID\"\n }\n EOM\n {\n \"vehicleState\": \"OFFLINE\",\n \"supportedTripTypes\": [\"EXCLUSIVE\"],\n \"maximumCapacity\": 4,\n \"vehicleType\": {\"category\": \"AUTO\"},\n \"attributes\": [{\"key\": \"on_trip\", \"value\": \"false\"}]\n }\n \n ```\n\n This command should print the name of the vehicle as output. If you\n see the following text, your setup is successful. \n\n ```\n {\n \"name\": \"providers/PROJECT_ID/vehicles/VEHICLE_ID\"\n }\n \n ```\n\n ### Scheduled tasks\n\n ```\n curl -X POST \"https://fleetengine.googleapis.com/v1/providers/PROJECT_ID/deliveryVehicles?deliveryVehicleId=DELIVERY_VEHICLE_ID\" \\\n -H \"Content-type: application/json\" \\\n -H \"Authorization: Bearer $(cat output.jwt)\" \\\n --data-binary @- \u003c\u003c EOM\n {\n \"name\": \"providers/PROJECT_ID/deliveryVehicles/DELIVERY_VEHICLE_ID\"\n }\n EOM\n \n ```\n\n This command should print the name of the delivery vehicle as output. If you\n see the following text, your setup is successful. \n\n ```\n {\n \"name\": \"providers/PROJECT_ID/deliveryVehicles/DELIVERY_VEHICLE_ID\"\n }\n \n ```\n | **Note:** Fleet Engine automatically purges all entities (including vehicles) after 7 days of inactivity, such as updates.\n\nWhat's next\n-----------\n\n- [Troubleshoot common issues](/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/troubleshoot)\n- [Create and use vehicles](/maps/documentation/mobility/fleet-engine/essentials/vehicles)"]]