Google Cloud Dataproc V1 Client - Class WorkflowTemplate (3.5.1)

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

Methods

__construct

Constructor.

Parameters
NameDescription
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
TypeDescription
string

setId

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

Parameter
NameDescription
var string
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var string
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var int
Returns
TypeDescription
$this

getCreateTime

Output only. The time template was created.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. The time template was created.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getUpdateTime

Output only. The time template was last updated.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. The time template was last updated.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getPlacement

Required. WorkflowTemplate scheduling information.

Returns
TypeDescription
Google\Cloud\Dataproc\V1\WorkflowTemplatePlacement|null

hasPlacement

clearPlacement

setPlacement

Required. WorkflowTemplate scheduling information.

Parameter
NameDescription
var Google\Cloud\Dataproc\V1\WorkflowTemplatePlacement
Returns
TypeDescription
$this

getJobs

Required. The Directed Acyclic Graph of Jobs to submit.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setJobs

Required. The Directed Acyclic Graph of Jobs to submit.

Parameter
NameDescription
var array<Google\Cloud\Dataproc\V1\OrderedJob>
Returns
TypeDescription
$this

getParameters

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

Returns
TypeDescription
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
NameDescription
var array<Google\Cloud\Dataproc\V1\TemplateParameter>
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var Google\Protobuf\Duration
Returns
TypeDescription
$this