# Method: projects.regions.workflowTemplates.instantiateInline

- [HTTP request](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.workflowTemplates/instantiateInline#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.workflowTemplates/instantiateInline#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.workflowTemplates/instantiateInline#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.workflowTemplates/instantiateInline#body.request_body)
- [Response body](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.workflowTemplates/instantiateInline#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.workflowTemplates/instantiateInline#body.aspect)
- [Try it!](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.workflowTemplates/instantiateInline#try-it)

Instantiates a template and begins execution.

This method is equivalent to executing the sequence `https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.locations.workflowTemplates/create#google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate`, `https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.locations.workflowTemplates/instantiate#google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate`, `https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.locations.workflowTemplates/delete#google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate`.

The returned Operation can be used to track execution of workflow by polling `https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.operations/get#google.longrunning.Operations.GetOperation`. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via `https://docs.cloud.google.com/managed-spark/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.

The `https://docs.cloud.google.com/managed-spark/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).

On successful completion, `https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.locations.operations#Operation.FIELDS.response` will be `https://protobuf.dev/reference/protobuf/google.protobuf#empty`.

### HTTP request

`POST https://dataproc.googleapis.com/v1/{parent=projects/*/regions/*}/workflowTemplates:instantiateInline`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The resource name of the region or location, as described in <https://cloud.google.com/apis/design/resource_names>. - For `projects.regions.workflowTemplates,instantiateinline`, the resource name of the region has the following format: `projects/{projectId}/regions/{region}` - For `projects.locations.workflowTemplates.instantiateinline`, the resource name of the location has the following format: `projects/{projectId}/locations/{location}` Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `dataproc.workflowTemplates.instantiateInline` |

### Query parameters

| Parameters ||
|---|---|
| `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](https://en.wikipedia.org/wiki/Universally_unique_identifier). The tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.locations.workflowTemplates#WorkflowTemplate`.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.locations.operations#Operation`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `
  https://www.googleapis.com/auth/dataproc`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).