Required. The ID of the Google Cloud Platform project that the cluster belongs to.
Authorization requires the following IAM permission on the specified resource projectId:
dataproc.clusters.create
region
string
Required. The Dataproc region in which to handle the request.
Query parameters
Parameters
requestId
string
Optional. A unique ID used to identify the request. If the server receives two CreateClusterRequests with the same id, then the second request will be ignored and the first google.longrunning.Operation created and stored in the backend is returned.
It is recommended to always set this value to a UUID.
The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-20 UTC."],[[["\u003cp\u003eThis API endpoint allows you to create a new cluster within a specified Google Cloud project and region using a POST HTTP request.\u003c/p\u003e\n"],["\u003cp\u003eYou must provide the \u003ccode\u003eprojectId\u003c/code\u003e and \u003ccode\u003eregion\u003c/code\u003e as path parameters in the request URL, and the project requires the \u003ccode\u003edataproc.clusters.create\u003c/code\u003e IAM permission.\u003c/p\u003e\n"],["\u003cp\u003eAn optional \u003ccode\u003erequestId\u003c/code\u003e query parameter can be included to ensure the uniqueness of cluster creation requests, preventing duplicate operations.\u003c/p\u003e\n"],["\u003cp\u003eThe request body expects an instance of \u003ccode\u003eCluster\u003c/code\u003e, and a successful response will contain a newly created instance of \u003ccode\u003eOperation\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eYou can also specify an optional \u003ccode\u003eactionOnFailedPrimaryWorkers\u003c/code\u003e query parameter which will determine the behavior of the api in the event that a resource associated with the cluster fails to be created, with options to take no action or to delete the resource.\u003c/p\u003e\n"]]],[],null,["# Method: projects.regions.clusters.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [FailureAction](#FailureAction)\n- [Try it!](#try-it)\n\nCreates a cluster in a project. The returned [Operation.metadata](/dataproc/docs/reference/rest/v1/projects.locations.operations#Operation.FIELDS.metadata) will be [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).\n\n### HTTP request\n\n`POST https://dataproc.googleapis.com/v1/projects/{projectId}/regions/{region}/clusters`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Query parameters\n\n### Request body\n\nThe request body contains an instance of [Cluster](/dataproc/docs/reference/rest/v1/projects.regions.clusters#Cluster).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Operation](/dataproc/docs/reference/rest/v1/projects.locations.operations#Operation).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp).\n\nFailureAction\n-------------\n\nActions in response to failure of a resource associated with a cluster."]]