public sealed class TemplateParameter : IMessage<TemplateParameter>, IEquatable<TemplateParameter>, IDeepCloneable<TemplateParameter>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Dataproc v1 API class TemplateParameter.
A configurable parameter that replaces one or more fields in the template.
Parameterizable fields:
Required. Paths to all fields that the parameter replaces.
A field is allowed to appear in at most one parameter's list of field
paths.
A field path is similar in syntax to a
[google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a
field path that references the zone field of a workflow template's cluster
selector would be specified as placement.clusterSelector.zone.
Also, field paths can reference fields using the following syntax:
Values in maps can be referenced by key:
labels['key']
placement.clusterSelector.clusterLabels['key']
placement.managedCluster.labels['key']
placement.clusterSelector.clusterLabels['key']
jobs['step-id'].labels['key']
Jobs in the jobs list can be referenced by step-id:
jobs['step-id'].hadoopJob.mainJarFileUri
jobs['step-id'].hiveJob.queryFileUri
jobs['step-id'].pySparkJob.mainPythonFileUri
jobs['step-id'].hadoopJob.jarFileUris[0]
jobs['step-id'].hadoopJob.archiveUris[0]
jobs['step-id'].hadoopJob.fileUris[0]
jobs['step-id'].pySparkJob.pythonFileUris[0]
Items in repeated fields can be referenced by a zero-based index:
jobs['step-id'].sparkJob.args[0]
Other examples:
jobs['step-id'].hadoopJob.properties['key']
jobs['step-id'].hadoopJob.args[0]
jobs['step-id'].hiveJob.scriptVariables['key']
jobs['step-id'].hadoopJob.mainJarFileUri
placement.clusterSelector.zone
It may not be possible to parameterize maps and repeated fields in their
entirety since only individual map values and individual items in repeated
fields can be referenced. For example, the following field paths are
invalid:
Required. Parameter name.
The parameter name is used as the key, and paired with the
parameter value, which are passed to the template when the template
is instantiated.
The name 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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis document provides reference documentation for the \u003ccode\u003eTemplateParameter\u003c/code\u003e class within the Google Cloud Dataproc v1 API, detailing its properties, fields, and usage within the .NET environment.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTemplateParameter\u003c/code\u003e class allows for the configuration of parameters that can replace fields in a template, including labels, file URIs, job properties, job arguments, script variables, main class, and zone.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTemplateParameter\u003c/code\u003e class contains required properties \u003ccode\u003eName\u003c/code\u003e, and \u003ccode\u003eFields\u003c/code\u003e, as well as optional properties like \u003ccode\u003eDescription\u003c/code\u003e, and \u003ccode\u003eValidation\u003c/code\u003e for detailed parameter customization and controls.\u003c/p\u003e\n"],["\u003cp\u003eMultiple versions of the Google Cloud Dataproc v1 API are available, with version 5.17.0 being the latest.\u003c/p\u003e\n"],["\u003cp\u003eThe available versions of the API reference the \u003ccode\u003eTemplateParameter\u003c/code\u003e object, which implements \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e interfaces, ensuring compatibility with other Google Cloud .NET libraries and systems.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Dataproc v1 API - Class TemplateParameter (5.20.0)\n\nVersion latestkeyboard_arrow_down\n\n- [5.20.0 (latest)](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [5.19.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.19.0/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [5.18.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.18.0/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [5.17.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.17.0/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [5.16.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.16.0/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [5.15.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.15.0/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [5.14.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.14.0/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [5.13.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.13.0/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [5.12.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.12.0/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [5.11.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.11.0/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [5.10.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.10.0/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [5.9.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.9.0/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [5.8.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.8.0/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [5.7.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.7.0/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [5.6.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.6.0/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [5.5.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.5.0/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [5.4.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.4.0/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [5.3.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.3.0/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [5.2.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.2.0/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [5.1.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.1.0/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [5.0.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.0.0/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [4.0.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/4.0.0/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/3.4.0/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/3.3.0/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/3.2.0/Google.Cloud.Dataproc.V1.TemplateParameter)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/3.1.0/Google.Cloud.Dataproc.V1.TemplateParameter) \n\n public sealed class TemplateParameter : IMessage\u003cTemplateParameter\u003e, IEquatable\u003cTemplateParameter\u003e, IDeepCloneable\u003cTemplateParameter\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Dataproc v1 API class TemplateParameter.\n\nA configurable parameter that replaces one or more fields in the template.\nParameterizable fields:\n\n- Labels\n- File uris\n- Job properties\n- Job arguments\n- Script variables\n- Main class (in HadoopJob and SparkJob)\n- Zone (in ClusterSelector) \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e TemplateParameter \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[TemplateParameter](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.TemplateParameter), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[TemplateParameter](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.TemplateParameter), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[TemplateParameter](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.TemplateParameter), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Dataproc.V1](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Dataproc.V1.dll\n\nConstructors\n------------\n\n### TemplateParameter()\n\n public TemplateParameter()\n\n### TemplateParameter(TemplateParameter)\n\n public TemplateParameter(TemplateParameter other)\n\nProperties\n----------\n\n### Description\n\n public string Description { get; set; }\n\nOptional. Brief description of the parameter.\nMust not exceed 1024 characters.\n\n### Fields\n\n public RepeatedField\u003cstring\u003e Fields { get; }\n\nRequired. Paths to all fields that the parameter replaces.\nA field is allowed to appear in at most one parameter's list of field\npaths.\n\nA field path is similar in syntax to a\n\\[google.protobuf.FieldMask\\]\\[google.protobuf.FieldMask\\]. For example, a\nfield path that references the zone field of a workflow template's cluster\nselector would be specified as `placement.clusterSelector.zone`.\n\nAlso, field paths can reference fields using the following syntax:\n\n- Values in maps can be referenced by key:\n\n - labels\\['key'\\]\n - placement.clusterSelector.clusterLabels\\['key'\\]\n - placement.managedCluster.labels\\['key'\\]\n - placement.clusterSelector.clusterLabels\\['key'\\]\n - jobs\\['step-id'\\].labels\\['key'\\]\n- Jobs in the jobs list can be referenced by step-id:\n\n - jobs\\['step-id'\\].hadoopJob.mainJarFileUri\n - jobs\\['step-id'\\].hiveJob.queryFileUri\n - jobs\\['step-id'\\].pySparkJob.mainPythonFileUri\n - jobs\\['step-id'\\].hadoopJob.jarFileUris\\[0\\]\n - jobs\\['step-id'\\].hadoopJob.archiveUris\\[0\\]\n - jobs\\['step-id'\\].hadoopJob.fileUris\\[0\\]\n - jobs\\['step-id'\\].pySparkJob.pythonFileUris\\[0\\]\n- Items in repeated fields can be referenced by a zero-based index:\n\n - jobs\\['step-id'\\].sparkJob.args\\[0\\]\n- Other examples:\n\n - jobs\\['step-id'\\].hadoopJob.properties\\['key'\\]\n - jobs\\['step-id'\\].hadoopJob.args\\[0\\]\n - jobs\\['step-id'\\].hiveJob.scriptVariables\\['key'\\]\n - jobs\\['step-id'\\].hadoopJob.mainJarFileUri\n - placement.clusterSelector.zone\n\nIt may not be possible to parameterize maps and repeated fields in their\nentirety since only individual map values and individual items in repeated\nfields can be referenced. For example, the following field paths are\ninvalid:\n\n- placement.clusterSelector.clusterLabels\n- jobs\\['step-id'\\].sparkJob.args\n\n### Name\n\n public string Name { get; set; }\n\nRequired. Parameter name.\nThe parameter name is used as the key, and paired with the\nparameter value, which are passed to the template when the template\nis instantiated.\nThe name must contain only capital letters (A-Z), numbers (0-9), and\nunderscores (_), and must not start with a number. The maximum length is\n40 characters.\n\n### Validation\n\n public ParameterValidation Validation { get; set; }\n\nOptional. Validation rules to be applied to this parameter's value."]]