- Resource: WorkflowTemplate
- Methods
Resource: WorkflowTemplate
A Dataproc workflow template resource.
JSON representation |
---|
{ "id": string, "name": string, "version": integer, "createTime": string, "updateTime": string, "labels": { string: string, ... }, "placement": { object ( |
Fields | |
---|---|
id |
|
name |
Output only. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.
|
version |
Optional. Used to perform a consistent read-modify-write. This field should be left blank for a |
createTime |
Output only. The time template was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
updateTime |
Output only. The time template was last updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
labels |
Optional. The labels to associate with this template. These labels will be propagated to all jobs and clusters created by the workflow instance. Label keys must contain 1 to 63 characters, and must conform to RFC 1035. Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035. No more than 32 labels can be associated with a template. An object containing a list of |
placement |
Required. WorkflowTemplate scheduling information. |
jobs[] |
Required. The Directed Acyclic Graph of Jobs to submit. |
parameters[] |
Optional. Template parameters whose values are substituted into the template. Values for parameters must be provided when the template is instantiated. |
dagTimeout |
Optional. Timeout duration for the DAG of jobs, expressed in seconds (see JSON representation of duration). The timeout duration must be from 10 minutes ("600s") to 24 hours ("86400s"). The timer begins when the first job is submitted. If the workflow is running at the end of the timeout period, any remaining jobs are cancelled, the workflow is ended, and if the workflow was running on a managed cluster, the cluster is deleted. |
encryptionConfig |
Optional. Encryption settings for encrypting workflow template job arguments. |
WorkflowTemplatePlacement
Specifies workflow execution target.
Either managedCluster
or clusterSelector
is required.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field placement . Required. Specifies where workflow executes; either on a managed cluster or an existing cluster chosen by labels. placement can be only one of the following: |
|
managedCluster |
A cluster that is managed by the workflow. |
clusterSelector |
Optional. A selector that chooses target cluster for jobs based on metadata. The selector is evaluated at the time each job is submitted. |
ManagedCluster
Cluster that is managed by the workflow.
JSON representation |
---|
{
"clusterName": string,
"config": {
object ( |
Fields | |
---|---|
clusterName |
Required. The cluster name prefix. A unique cluster name will be formed by appending a random suffix. The name must contain only lower-case letters (a-z), numbers (0-9), and hyphens (-). Must begin with a letter. Cannot begin or end with hyphen. Must consist of between 2 and 35 characters. |
config |
Required. The cluster configuration. |
labels |
Optional. The labels to associate with this cluster. Label keys must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} Label values must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 32 labels can be associated with a given cluster. An object containing a list of |
ClusterSelector
A selector that chooses target cluster for jobs based on metadata.
JSON representation |
---|
{ "zone": string, "clusterLabels": { string: string, ... } } |
Fields | |
---|---|
zone |
Optional. The zone where workflow process executes. This parameter does not affect the selection of the cluster. If unspecified, the zone of the first cluster matching the selector is used. |
clusterLabels |
Required. The cluster labels. Cluster must have all labels to match. An object containing a list of |
OrderedJob
A job executed by the workflow.
JSON representation |
---|
{ "stepId": string, "labels": { string: string, ... }, "scheduling": { object ( |
Fields | |
---|---|
stepId |
Required. The step id. The id must be unique among all jobs within the template. The step id is used as prefix for job id, as job The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters. |
labels |
Optional. The labels to associate with this job. Label keys must be between 1 and 63 characters long, and must conform to the following regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} Label values must be between 1 and 63 characters long, and must conform to the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 32 labels can be associated with a given job. An object containing a list of |
scheduling |
Optional. Job scheduling configuration. |
prerequisiteStepIds[] |
Optional. The optional list of prerequisite job step_ids. If not specified, the job will start at the beginning of workflow. |
Union field job_type . Required. The job definition. job_type can be only one of the following: |
|
hadoopJob |
Optional. Job is a Hadoop job. |
sparkJob |
Optional. Job is a Spark job. |
pysparkJob |
Optional. Job is a PySpark job. |
hiveJob |
Optional. Job is a Hive job. |
pigJob |
Optional. Job is a Pig job. |
sparkRJob |
Optional. Job is a SparkR job. |
sparkSqlJob |
Optional. Job is a SparkSql job. |
prestoJob |
Optional. Job is a Presto job. |
flinkJob |
Optional. Job is a Flink job. |
TemplateParameter
A configurable parameter that replaces one or more fields in the template. Parameterizable fields: - Labels - File uris - Job properties - Job arguments - Script variables - Main class (in HadoopJob and SparkJob) - Zone (in ClusterSelector)
JSON representation |
---|
{
"name": string,
"fields": [
string
],
"description": string,
"validation": {
object ( |
Fields | |
---|---|
name |
Required. Parameter name. The parameter name is used as the key, and paired with the parameter value, which are passed to the template when the template is instantiated. The name must contain only capital letters (A-Z), numbers (0-9), and underscores (_), and must not start with a number. The maximum length is 40 characters. |
fields[] |
Required. Paths to all fields that the parameter replaces. A field is allowed to appear in at most one parameter's list of field paths. A field path is similar in syntax to a Also, field paths can reference fields using the following syntax:
It may not be possible to parameterize maps and repeated fields in their entirety since only individual map values and individual items in repeated fields can be referenced. For example, the following field paths are invalid:
|
description |
Optional. Brief description of the parameter. Must not exceed 1024 characters. |
validation |
Optional. Validation rules to be applied to this parameter's value. |
ParameterValidation
Configuration for parameter validation.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field validation_type . Required. The type of validation to be performed. validation_type can be only one of the following: |
|
regex |
Validation based on regular expressions. |
values |
Validation based on a list of allowed values. |
RegexValidation
Validation based on regular expressions.
JSON representation |
---|
{ "regexes": [ string ] } |
Fields | |
---|---|
regexes[] |
Required. RE2 regular expressions used to validate the parameter's value. The value must match the regex in its entirety (substring matches are not sufficient). |
ValueValidation
Validation based on a list of allowed values.
JSON representation |
---|
{ "values": [ string ] } |
Fields | |
---|---|
values[] |
Required. List of allowed values for the parameter. |
EncryptionConfig
Encryption settings for encrypting workflow template job arguments.
JSON representation |
---|
{ "kmsKey": string } |
Fields | |
---|---|
kmsKey |
Optional. The Cloud KMS key name to use for encrypting workflow template job arguments. When this this key is provided, the following workflow template job arguments, if present, are CMEK encrypted:
|
Methods |
|
---|---|
|
Creates new workflow template. |
|
Deletes a workflow template. |
|
Retrieves the latest workflow template. |
|
Gets the access control policy for a resource. |
|
Instantiates a template and begins execution. |
|
Instantiates a template and begins execution. |
|
Lists workflows that match the specified filter in the request. |
|
Sets the access control policy on the specified resource. |
|
Returns permissions that a caller has on the specified resource. |
|
Updates (replaces) workflow template. |