Class: Google::Apis::DataprocV1::ClusterSelector

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

Overview

A selector that chooses target cluster for jobs based on metadata.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ClusterSelector

Returns a new instance of ClusterSelector.



745
746
747
# File 'lib/google/apis/dataproc_v1/classes.rb', line 745

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

Instance Attribute Details

#cluster_labelsHash<String,String>

Required. The cluster labels. Cluster must have all labels to match. Corresponds to the JSON property clusterLabels

Returns:

  • (Hash<String,String>)


736
737
738
# File 'lib/google/apis/dataproc_v1/classes.rb', line 736

def cluster_labels
  @cluster_labels
end

#zoneString

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

Returns:

  • (String)


743
744
745
# File 'lib/google/apis/dataproc_v1/classes.rb', line 743

def zone
  @zone
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



750
751
752
753
# File 'lib/google/apis/dataproc_v1/classes.rb', line 750

def update!(**args)
  @cluster_labels = args[:cluster_labels] if args.key?(:cluster_labels)
  @zone = args[:zone] if args.key?(:zone)
end