Class: Google::Apis::DataprocV1beta2::TemplateParameter
- Inherits:
-
Object
- Object
- Google::Apis::DataprocV1beta2::TemplateParameter
- 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
-
#description ⇒ String
Optional.
-
#fields ⇒ Array<String>
Required.
-
#name ⇒ String
Required.
-
#validation ⇒ Google::Apis::DataprocV1beta2::ParameterValidation
Configuration for parameter validation.
Instance Method Summary collapse
-
#initialize(**args) ⇒ TemplateParameter
constructor
A new instance of TemplateParameter.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
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
#description ⇒ String
Optional. User-friendly description of the parameter. Must not exceed 1024
characters.
Corresponds to the JSON property description
2254 2255 2256 |
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 2254 def description @description end |
#fields ⇒ Array<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
2285 2286 2287 |
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 2285 def fields @fields end |
#name ⇒ String
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
2293 2294 2295 |
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 2293 def name @name end |
#validation ⇒ Google::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 |