Method: projects.regions.workflowTemplates.instantiate

Instantiates a template and begins execution.

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.

The Operation.metadata will be WorkflowMetadata.

On successful completion, Operation.response will be Empty.

HTTP request

POST https://dataproc.googleapis.com/v1beta2/{name=projects/*/regions/*/workflowTemplates/*}:instantiate

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The "resource name" of the workflow template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{projectId}/regions/{region}/workflowTemplates/{template_id}

Authorization requires the following Google IAM permission on the specified resource name:

  • dataproc.workflowTemplates.instantiate

Request body

The request body contains data with the following structure:

JSON representation
{
  "version": number,
  "instanceId": string,
  "requestId": string,
  "parameters": {
    string: string,
    ...
  }
}
Fields
version

number

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.

instanceId
(deprecated)

string

Deprecated. Please use requestId field instead.

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 100 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.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

Try it!

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Dataproc