Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
Antes de executar jobs do Dataproc, é necessário criar um cluster de máquinas virtuais em que eles serão executados. Para criar um cluster do Dataproc no seu projeto, preencha e execute o modelo do APIs Explorer do Google APIs Explorer.
Especifique a região em que o cluster estará localizado (aceite ou substitua "us-central1"). Como você não está especificando uma zona na região neste guia de início rápido, a posição de zona automática do Dataproc escolherá uma zona dentro da região em que o cluster será criado.
Corpo da solicitação:
Especifique um
clusterName
(aceite ou substitua "example-cluster").
Esse nome será usado para interagir com o cluster, por exemplo, quando você enviar jobs ou atualizar o cluster.
Clique em EXECUTAR. Na primeira vez que você
executar o modelo da API, talvez seja necessário escolher e fazer login na
sua Conta do Google e autorizar o Google APIs Explorer a acessar sua
conta. Se a solicitação for bem-sucedida, a resposta JSON mostrará que a criação do cluster está pendente.
Para confirmar a criação do cluster, abra a página
Clusters do Dataproc
no console do Google Cloud . Após a conclusão do provisionamento do cluster,
o status dele será exibido como "Em execução".
Limpar
Para evitar cobranças na sua conta do Google Cloud pelos
recursos usados nesta página, siga estas etapas.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-22 UTC."],[[["\u003cp\u003eThis guide demonstrates how to create a Dataproc cluster using an inline Google APIs Explorer template to interact with the Dataproc API.\u003c/p\u003e\n"],["\u003cp\u003eBefore running Dataproc jobs, a cluster of virtual machines must be created using the provided Google APIs Explorer template, which requires your project ID and a specified region.\u003c/p\u003e\n"],["\u003cp\u003eWhen creating a cluster, users must input their project ID, choose a cluster region, and assign a cluster name, with options to accept or alter pre-filled values.\u003c/p\u003e\n"],["\u003cp\u003eAfter cluster creation, you can verify its status as "Running" on the Dataproc Clusters page in the Google Cloud console, and if no longer needed, the cluster should be deleted to avoid charges.\u003c/p\u003e\n"],["\u003cp\u003eAlternative ways to create a cluster exist, such as using the Google Cloud console, the Google Cloud CLI, or client libraries, and these are also options for removing the cluster.\u003c/p\u003e\n"]]],[],null,["# Quickstart: Create a Dataproc cluster by using a template\n\nCreate a Dataproc cluster by using a template\n=============================================\n\nThis page shows you how to use an inline\n[Google APIs Explorer](https://developers.google.com/apis-explorer/#p/)\ntemplate to call the Dataproc API to create a Dataproc cluster.\n\nFor other ways to create a cluster, see:\n\n- [Create a Dataproc cluster by using the Google Cloud console](/dataproc/docs/quickstarts/create-cluster-console#create_a_cluster)\n- [Create a Dataproc cluster by using the Google Cloud CLI](/dataproc/docs/quickstarts/create-cluster-gcloud#create_a_cluster)\n- [Create a Dataproc cluster by using client libraries](/dataproc/docs/quickstarts/create-cluster-client-libraries)\n\nBefore you begin\n----------------\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Dataproc API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=dataproc&redirect=https://console.cloud.google.com)\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Dataproc API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=dataproc&redirect=https://console.cloud.google.com)\n\n\u003cbr /\u003e\n\nCreate a cluster\n----------------\n\nBefore you can run Dataproc jobs, you need to create a cluster\nof virtual machines to run them on. To create a Dataproc cluster\nin your project, fill in and execute the Google APIs Explorer **Try this API**\ntemplate.\n| **Note:** The `region` and `clusterName` parameter values are filled in for you. Accept or replace these \"seeded\" parameter values.\n\n1. **Request parameters:**\n\n 1. Insert your [**projectId**](https://console.cloud.google.com/).\n 2. Specify the [**region**](/compute/docs/regions-zones/regions-zones#available) where your cluster will be located (accept or replace \"us-central1\"). Since you are not specifying a zone within the region in this quickstart, [Dataproc Auto Zone placement](/dataproc/docs/concepts/configuring-clusters/auto-zone) will pick a zone within the region where it will create the cluster.\n2. **Request body:**\n\n 1. Specify a [**clusterName**](/dataproc/docs/reference/rest/v1/projects.regions.clusters#Cluster.FIELDS.cluster_name), (accept or replace \"example-cluster\"). You will use this name to interact with your cluster, for example when you [submit jobs](/dataproc/docs/quickstarts/submit-spark-job-template) or [update the cluster](/dataproc/docs/quickstarts/update-cluster-template).\n3. Click **EXECUTE**. The first time you\n run the API template, you may be asked to choose and sign into\n your Google account, then authorize the Google APIs Explorer to access your\n account. If the request is successful, the JSON response\n shows that cluster creation is pending.\n\n4. To confirm cluster creation, open the\n [Dataproc Clusters](https://console.cloud.google.com/dataproc/clusters)\n page in the Google Cloud console. After cluster provisioning completes,\n the cluster's status will show as \"Running\".\n\n\nClean up\n--------\n\n\nTo avoid incurring charges to your Google Cloud account for\nthe resources used on this page, follow these steps.\n\n\u003cbr /\u003e\n\n1. If you don't need the cluster to explore the other quickstarts or to run other jobs, use the [APIs Explorer](/dataproc/docs/quickstarts/quickstart-explorer-delete), the [Google Cloud console](/dataproc/docs/quickstarts/create-cluster-console#clean-up), the gcloud CLI [gcloud](/dataproc/docs/quickstarts/create-cluster-gcloud#clean-up) command-line tool, or the [Cloud Client Libraries](/dataproc/docs/quickstarts/create-cluster-client-libraries) to delete the cluster.\n\nWhat's next\n-----------\n\n- Learn how to [submit a Spark job by using a template](/dataproc/docs/quickstarts/submit-spark-job-template)."]]