Class: Google::Apis::DataprocV1beta2::TemplateParameter

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 configurable parameter that replaces one or more fields in the template.

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) ⇒ TemplateParameter

Returns a new instance of TemplateParameter



2300
2301
2302
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 2300

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

Instance Attribute Details

#descriptionString

Optional. User-friendly description of the parameter. Must not exceed 1024 characters. Corresponds to the JSON property description

Returns:

  • (String)


2254
2255
2256
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 2254

def description
  @description
end

#fieldsArray<String>

Required. Paths to all fields that this parameter replaces. Each field may appear in at most one Parameter's fields list.Field path syntax:A field path is similar to a FieldMask. For example, a field path that references the zone field of the template's cluster selector would look like:placement. clusterSelector.zoneThe only differences between field paths and standard field masks are that: Values in maps can be referenced by key.Example: placement.clusterSelector. clusterLabels'key' Jobs in the jobs list can be referenced by step id.Example: jobs'step-id'. hadoopJob.mainJarFileUri Items in repeated fields can be referenced by zero-based index.Example: jobs' step-id'.sparkJob.args0NOTE: Maps and repeated fields may not be parameterized in their entirety. Only individual map values and items in repeated fields may be referenced. For example, the following field paths are invalid: - placement. clusterSelector.clusterLabels - jobs'step-id'.sparkJob.argsParameterizable fields:Only certain types of fields may be parameterized, specifically: - Labels - File uris - Job properties - Job arguments - Script variables - Main class (in HadoopJob and SparkJob) - Zone (in ClusterSelector)Examples of parameterizable fields:Labels:labels'key' placement.managedCluster.labels'key' placement.clusterSelector.clusterLabels'key' jobs'step-id'.labels'key'File uris:jobs'step-id'.hadoopJob.mainJarFileUri jobs'step-id'.hiveJob.queryFileUri jobs'step-id'.pySparkJob.mainPythonFileUri jobs'step-id'.hadoopJob. jarFileUris0 jobs'step-id'.hadoopJob.archiveUris0 jobs'step-id'.hadoopJob. fileUris0 jobs'step-id'.pySparkJob.pythonFileUris0Other:jobs'step-id'. hadoopJob.properties'key' jobs'step-id'.hadoopJob.args0 jobs'step-id'.hiveJob. scriptVariables'key' jobs'step-id'.hadoopJob.mainJarFileUri placement. clusterSelector.zone Corresponds to the JSON property fields

Returns:

  • (Array<String>)


2285
2286
2287
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 2285

def fields
  @fields
end

#nameString

Required. User-friendly parameter name. This name is used as a key when providing a value for this parameter when the template is instantiated. 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. Corresponds to the JSON property name

Returns:

  • (String)


2293
2294
2295
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 2293

def name
  @name
end

#validationGoogle::Apis::DataprocV1beta2::ParameterValidation

Configuration for parameter validation. Corresponds to the JSON property validation



2298
2299
2300
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 2298

def validation
  @validation
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2305
2306
2307
2308
2309
2310
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 2305

def update!(**args)
  @description = args[:description] if args.key?(:description)
  @fields = args[:fields] if args.key?(:fields)
  @name = args[:name] if args.key?(:name)
  @validation = args[:validation] if args.key?(:validation)
end