Class: Google::Apis::DataprocV1beta2::WorkflowTemplate

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/dataproc_v1beta2/classes.rb,
generated/google/apis/dataproc_v1beta2/representations.rb,
generated/google/apis/dataproc_v1beta2/representations.rb

Overview

A Cloud Dataproc workflow template resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ WorkflowTemplate

Returns a new instance of WorkflowTemplate



2637
2638
2639
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 2637

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#create_timeString

Output only. The time template was created. Corresponds to the JSON property createTime

Returns:

  • (String)


2577
2578
2579
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 2577

def create_time
  @create_time
end

#idString

Required. The template id.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. Corresponds to the JSON property id

Returns:

  • (String)


2584
2585
2586
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 2584

def id
  @id
end

#jobsArray<Google::Apis::DataprocV1beta2::OrderedJob>

Required. The Directed Acyclic Graph of Jobs to submit. Corresponds to the JSON property jobs



2589
2590
2591
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 2589

def jobs
  @jobs
end

#labelsHash<String,String>

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 (https:// www.ietf.org/rfc/rfc1035.txt).Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/ rfc/rfc1035.txt).No more than 32 labels can be associated with a template. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


2599
2600
2601
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 2599

def labels
  @labels
end

#nameString

Output only. The "resource name" of the template, as described in https:// cloud.google.com/apis/design/resource_names of the form projects/project_id/ regions/region/workflowTemplates/template_id Corresponds to the JSON property name

Returns:

  • (String)


2606
2607
2608
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 2606

def name
  @name
end

#parametersArray<Google::Apis::DataprocV1beta2::TemplateParameter>

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



2612
2613
2614
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 2612

def parameters
  @parameters
end

#placementGoogle::Apis::DataprocV1beta2::WorkflowTemplatePlacement

Specifies workflow execution target.Either managed_cluster or cluster_selector is required. Corresponds to the JSON property placement



2618
2619
2620
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 2618

def placement
  @placement
end

#update_timeString

Output only. The time template was last updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


2623
2624
2625
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 2623

def update_time
  @update_time
end

#versionFixnum

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. Corresponds to the JSON property version

Returns:

  • (Fixnum)


2635
2636
2637
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 2635

def version
  @version
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 2642

def update!(**args)
  @create_time = args[:create_time] if args.key?(:create_time)
  @id = args[:id] if args.key?(:id)
  @jobs = args[:jobs] if args.key?(:jobs)
  @labels = args[:labels] if args.key?(:labels)
  @name = args[:name] if args.key?(:name)
  @parameters = args[:parameters] if args.key?(:parameters)
  @placement = args[:placement] if args.key?(:placement)
  @update_time = args[:update_time] if args.key?(:update_time)
  @version = args[:version] if args.key?(:version)
end