Trabaja con tu representante de ventas de Google para habilitar la facturación y las APIs de tu servicio específico.
Instala la herramienta de Cloud CLI para completar la configuración del servicio que comenzaste con tu representante de ventas.
Autentica la CLI en tu proyecto.
Nota: Considera usar el entorno interactivo de Cloud Shell, en el que ya están instalados el SDK de Cloud y otras dependencias, como **curl**. Consulta Cómo usar Cloud Shell.
shell
gcloudauthlogin
Deberías ver un mensaje de confirmación como el siguiente:
Si este comando genera un error, comunícate con el administrador del proyecto y con tu representante de atención al cliente de Google para obtener acceso.
Crea cuentas de servicio en la consola
Para crear una cuenta de servicio, haz lo siguiente:
Busca la tarjeta IAM y administración y haz clic en ella.
En el panel de navegación de la izquierda, selecciona Cuentas de servicio.
En la parte superior de la página, haz clic en Crear cuenta de servicio.
Ingresa un nombre de cuenta de servicio para mostrar en la consola de Google Cloud. Luego, la consola de Google Cloud genera un ID de cuenta de servicio a partir de este nombre.
Por ejemplo, ingresa fleet-engine-driver-sdk para tu cuenta de servicio de usuario del SDK del controlador.
En el menú desplegable Rol, selecciona Fleet Engine y asigna uno de los roles a la cuenta de servicio.
Omite la sección Otorga a usuarios acceso a esta cuenta de servicio.
Haz clic en Listo para terminar de crear la cuenta de servicio.
[null,null,["Última actualización: 2025-08-31 (UTC)"],[[["\u003cp\u003eThis guide explains how to set up a Google Cloud project for Fleet Engine, including enabling billing and necessary APIs.\u003c/p\u003e\n"],["\u003cp\u003eIt details the process of creating service accounts with specific roles using both the Google Cloud Console and the command-line interface.\u003c/p\u003e\n"],["\u003cp\u003eYou'll learn how to assign roles such as \u003ccode\u003efleetengine.ondemandAdmin\u003c/code\u003e and \u003ccode\u003efleetengine.driverSdkUser\u003c/code\u003e to these service accounts.\u003c/p\u003e\n"],["\u003cp\u003eThe guide provides instructions for authenticating the Cloud CLI to your project for command-line operations.\u003c/p\u003e\n"],["\u003cp\u003eIt also offers guidance on using Cloud Shell for a pre-configured environment.\u003c/p\u003e\n"]]],["First, create a Google Cloud Project and enable billing and APIs with your sales representative. Install and authenticate the Cloud CLI tool. Enable the Fleet Engine API using `gcloud`. To create service accounts via the console, navigate to IAM & Admin, select \"Service Accounts,\" and create with specific Fleet Engine roles. Using the CLI, create service accounts for admin, driver-sdk, and consumer-sdk, and bind them to roles like `fleetengine.ondemandAdmin` or `fleetengine.deliveryAdmin`, depending on on-demand trips or scheduled task roles.\n"],null,["# Create your Fleet Engine project\n\nThis guide covers how to set up your Google Cloud project and create service\naccount roles from the command-line utility.\n\nFor more details, see [Service account roles](/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/service-accounts).\n\n### Set up the Cloud project\n\n- Create a Google Cloud Project using the Google Cloud Console. Follow the\n basic instructions on the [Getting Started with Google Maps Platform](https://developers.google.com/maps/get-started#create-project)\n\n- Work with your Google sales representative to enable billing and the APIs\n for your specific service.\n\n- Install the [Cloud CLI tool](https://cloud.google.com/sdk/docs/install) to complete the service\n configuration you started with your sales representative.\n\n- Authenticate the CLI to your project.\n\n**Note** : Consider using the Cloud Shell interactive environment where Cloud SDK\nand other dependencies such as `**curl**` are already installed. See [Using\nCloud Shell](https://cloud.google.com/shell/docs/using-cloud-shell). \n\n### shell\n\n gcloud auth login\n\nYou should see a success message such as: \n\n You are now logged in as [\u003cvar translate=\"no\"\u003emy-user@example.com\u003c/var\u003e].\n Your current project is [\u003cvar translate=\"no\"\u003eproject-id\u003c/var\u003e]. You ...\n\n| **Note:** Edit the variable values in code blocks to prepare subsequent commands so they can be directly copied and pasted.\n\nCheck that Fleet Engine APIs are configured appropriately. \n\n### shell\n\n gcloud --project=\u003cvar translate=\"no\"\u003eproject-id\u003c/var\u003e services enable fleetengine.googleapis.com\n\nIf this command results in an error, check with your project administrator\nand your Google support representative to get access.\n\n### Create service accounts in the console\n\nTo create a service account, do the following:\n\n1. Go to the [Google Cloud console](https://console.cloud.google.com/).\n2. Find and click the **IAM \\& Admin** card.\n3. In the left-hand navigation, select **Service Accounts**.\n4. At the top of the page, click **Create Service Account**.\n5. Enter a service account name to display in the Google Cloud console. The Google Cloud console then generates a service account ID based on this name. For example, enter *fleet-engine-driver-sdk* for your Driver SDK User Service Account.\n6. From the **Role** drop-down, select **Fleet Engine** and assign one of the roles to the service account.\n7. Skip the **Grant users access to this service account** section.\n8. Click **Done** to finish creating the service account.\n\nSee also [Create a service\naccount](https://cloud.google.com/iam/docs/service-accounts-create#creating)\n.\n\n### Create service accounts using the Google Cloud Command line utility\n\nFor example, create a service account for each of the three roles and assign\nthem their respective roles. \n\n### On-demand trips roles\n\n```\ngcloud --project=project-id iam service-accounts create fleet-engine-admin\ngcloud projects add-iam-policy-binding project-id \\\n --member=serviceAccount:fleet-engine-admin@project-id.iam.gserviceaccount.com \\\n --role=roles/fleetengine.ondemandAdmin\n\ngcloud --project=project-id iam service-accounts create fleet-engine-driver-sdk\ngcloud projects add-iam-policy-binding project-id \\\n --member=serviceAccount:fleet-engine-driver-sdk@project-id.iam.gserviceaccount.com \\\n --role=roles/fleetengine.driverSdkUser\n\ngcloud --project=project-id iam service-accounts create fleet-engine-consumer-sdk\ngcloud projects add-iam-policy-binding project-id \\\n --member=serviceAccount:fleet-engine-consumer-sdk@project-id.iam.gserviceaccount.com \\\n --role=roles/fleetengine.consumerSdkUser\n```\n\n### Scheduled tasks roles\n\n```\ngcloud --project=project-id iam service-accounts create fleet-engine-admin\ngcloud projects add-iam-policy-binding project-id \\\n --member=serviceAccount:fleet-engine-admin@project-id.iam.gserviceaccount.com \\\n --role=roles/fleetengine.deliveryAdmin\n\ngcloud --project=project-id iam service-accounts create fleet-engine-driver-sdk\ngcloud projects add-iam-policy-binding project-id \\\n --member=serviceAccount:fleet-engine-driver-sdk@project-id.iam.gserviceaccount.com \\\n --role=roles/fleetengine.deliveryUntrustedDriver\n\ngcloud --project=project-id iam service-accounts create fleet-engine-consumer-sdk\ngcloud projects add-iam-policy-binding project-id \\\n --member=serviceAccount:fleet-engine-consumer-sdk@project-id.iam.gserviceaccount.com \\\n --role=roles/fleetengine.deliveryConsumer\n```\n\nWhat's next\n-----------\n\n- [Issue JSON Web Tokens](/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/issue-jwt)"]]