Google Cloud Dataproc V1 Client - Class WorkflowTemplate (3.14.0)

Reference documentation and code samples for the Google Cloud Dataproc V1 Client class WorkflowTemplate.

A Dataproc workflow template resource.

Generated from protobuf message google.cloud.dataproc.v1.WorkflowTemplate

Namespace

Google \ Cloud \ Dataproc \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ id string
↳ name string

Output only. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names. * For projects.regions.workflowTemplates, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id} * For projects.locations.workflowTemplates, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}

↳ version int

Optional. Used to perform a consistent read-modify-write. This field should be left blank for a CreateWorkflowTemplate request. It is required for an UpdateWorkflowTemplate request, and must match the current server version. A typical update template flow would fetch the current template with a GetWorkflowTemplate request, which will return the current template with the version field filled in with the current server version. The user updates other fields in the template, then returns it as part of the UpdateWorkflowTemplate request.

↳ create_time Google\Protobuf\Timestamp

Output only. The time template was created.

↳ update_time Google\Protobuf\Timestamp

Output only. The time template was last updated.

↳ labels array|Google\Protobuf\Internal\MapField

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.

↳ placement Google\Cloud\Dataproc\V1\WorkflowTemplatePlacement

Required. WorkflowTemplate scheduling information.

↳ jobs array<Google\Cloud\Dataproc\V1\OrderedJob>

Required. The Directed Acyclic Graph of Jobs to submit.

↳ parameters array<Google\Cloud\Dataproc\V1\TemplateParameter>

Optional. Template parameters whose values are substituted into the template. Values for parameters must be provided when the template is instantiated.

↳ dag_timeout Google\Protobuf\Duration

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.

getId

Generated from protobuf field string id = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
string

setId

Generated from protobuf field string id = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
var string
Returns
Type Description
$this

getName

Output only. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.

  • For projects.regions.workflowTemplates, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
  • For projects.locations.workflowTemplates, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}
Returns
Type Description
string

setName

Output only. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.

  • For projects.regions.workflowTemplates, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
  • For projects.locations.workflowTemplates, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}
Parameter
Name Description
var string
Returns
Type Description
$this

getVersion

Optional. Used to perform a consistent read-modify-write.

This field should be left blank for a CreateWorkflowTemplate request. It is required for an UpdateWorkflowTemplate request, and must match the current server version. A typical update template flow would fetch the current template with a GetWorkflowTemplate request, which will return the current template with the version field filled in with the current server version. The user updates other fields in the template, then returns it as part of the UpdateWorkflowTemplate request.

Returns
Type Description
int

setVersion

Optional. Used to perform a consistent read-modify-write.

This field should be left blank for a CreateWorkflowTemplate request. It is required for an UpdateWorkflowTemplate request, and must match the current server version. A typical update template flow would fetch the current template with a GetWorkflowTemplate request, which will return the current template with the version field filled in with the current server version. The user updates other fields in the template, then returns it as part of the UpdateWorkflowTemplate request.

Parameter
Name Description
var int
Returns
Type Description
$this

getCreateTime

Output only. The time template was created.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. The time template was created.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getUpdateTime

Output only. The time template was last updated.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. The time template was last updated.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getLabels

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.

Returns
Type Description
Google\Protobuf\Internal\MapField

setLabels

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.

Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this

getPlacement

Required. WorkflowTemplate scheduling information.

Returns
Type Description
Google\Cloud\Dataproc\V1\WorkflowTemplatePlacement|null

hasPlacement

clearPlacement

setPlacement

Required. WorkflowTemplate scheduling information.

Parameter
Name Description
var Google\Cloud\Dataproc\V1\WorkflowTemplatePlacement
Returns
Type Description
$this

getJobs

Required. The Directed Acyclic Graph of Jobs to submit.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setJobs

Required. The Directed Acyclic Graph of Jobs to submit.

Parameter
Name Description
var array<Google\Cloud\Dataproc\V1\OrderedJob>
Returns
Type Description
$this

getParameters

Optional. Template parameters whose values are substituted into the template. Values for parameters must be provided when the template is instantiated.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setParameters

Optional. Template parameters whose values are substituted into the template. Values for parameters must be provided when the template is instantiated.

Parameter
Name Description
var array<Google\Cloud\Dataproc\V1\TemplateParameter>
Returns
Type Description
$this

getDagTimeout

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.

Returns
Type Description
Google\Protobuf\Duration|null

hasDagTimeout

clearDagTimeout

setDagTimeout

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.

Parameter
Name Description
var Google\Protobuf\Duration
Returns
Type Description
$this