The returned Operation can be used to track execution of workflow by polling operations.get. The Operation will complete when entire workflow is finished.
The running workflow can be aborted via operations.cancel. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.
For projects.regions.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{projectId}/regions/{region}/workflowTemplates/{template_id}
For projects.locations.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{projectId}/locations/{location}/workflowTemplates/{template_id}
Authorization requires the following IAM permission on the specified resource name:
dataproc.workflowTemplates.instantiate
Request body
The request body contains data with the following structure:
Optional. The version of workflow template to instantiate. If specified, the workflow will be instantiated only if the current version of the workflow template has the supplied version.
This option cannot be used to instantiate a previous version of workflow template.
requestId
string
Optional. A tag that prevents multiple concurrent workflow instances with the same tag from running. This mitigates risk of concurrent instances started due to retries.
It is recommended to always set this value to a UUID.
The tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.
parameters
map (key: string, value: string)
Optional. Map from parameter names to values that should be used for those parameters. Values may not exceed 1000 characters.
An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
Response body
If successful, the response body contains an instance of Operation.
[[["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 instantiates a workflow template and initiates its execution, allowing tracking via an \u003ccode\u003eOperation\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eThe workflow's progress can be followed by polling \u003ccode\u003eoperations.get\u003c/code\u003e, and it can be stopped via \u003ccode\u003eoperations.cancel\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request to start the workflow is a \u003ccode\u003ePOST\u003c/code\u003e request to a specified URL, with the \u003ccode\u003ename\u003c/code\u003e parameter indicating the resource path.\u003c/p\u003e\n"],["\u003cp\u003eThe request body can include a \u003ccode\u003eversion\u003c/code\u003e integer, \u003ccode\u003erequestId\u003c/code\u003e string, and a map of \u003ccode\u003eparameters\u003c/code\u003e to customize the workflow instantiation.\u003c/p\u003e\n"],["\u003cp\u003eUpon success, the response body will include an \u003ccode\u003eOperation\u003c/code\u003e instance that can be used to monitor the status of the workflow.\u003c/p\u003e\n"]]],[],null,["# Method: projects.regions.workflowTemplates.instantiate\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nInstantiates a template and begins execution.\n\nThe returned Operation can be used to track execution of workflow by polling [operations.get](/dataproc/docs/reference/rest/v1/projects.regions.operations/get#google.longrunning.Operations.GetOperation). The Operation will complete when entire workflow is finished.\n\nThe running workflow can be aborted via [operations.cancel](/dataproc/docs/reference/rest/v1/projects.regions.operations/cancel#google.longrunning.Operations.CancelOperation). This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.\n\nThe [Operation.metadata](/dataproc/docs/reference/rest/v1/projects.locations.operations#Operation.FIELDS.metadata) will be [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). Also see [Using WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).\n\nOn successful completion, [Operation.response](/dataproc/docs/reference/rest/v1/projects.locations.operations#Operation.FIELDS.response) will be [Empty](https://protobuf.dev/reference/protobuf/google.protobuf/#empty).\n\n### HTTP request\n\n`POST https://dataproc.googleapis.com/v1/{name=projects/*/regions/*/workflowTemplates/*}:instantiate`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains an 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)."]]