blob: e2716bd86f6b7161e5a15f01b4bb5a1cf23dbed6 [file] [log] [blame]
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070075<h1><a href="dataproc_v1.html">Cloud Dataproc API</a> . <a href="dataproc_v1.projects.html">projects</a> . <a href="dataproc_v1.projects.regions.html">regions</a> . <a href="dataproc_v1.projects.regions.jobs.html">jobs</a></h1>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080076<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070078 <code><a href="#cancel">cancel(projectId, region, jobId, body=None, x__xgafv=None)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -070079<p class="firstline">Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs.list (https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/list) or regions/{region}/jobs.get (https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/get).</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080080<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070081 <code><a href="#close">close()</a></code></p>
82<p class="firstline">Close httplib2 connections.</p>
83<p class="toc_element">
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080084 <code><a href="#delete">delete(projectId, region, jobId, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040085<p class="firstline">Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080086<p class="toc_element">
87 <code><a href="#get">get(projectId, region, jobId, x__xgafv=None)</a></code></p>
88<p class="firstline">Gets the resource representation for a job in a project.</p>
89<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070090 <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
91<p class="firstline">Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.</p>
92<p class="toc_element">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -080093 <code><a href="#list">list(projectId, region, clusterName=None, filter=None, jobStateMatcher=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080094<p class="firstline">Lists regions/{region}/jobs in a project.</p>
95<p class="toc_element">
96 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#patch">patch(projectId, region, jobId, body=None, updateMask=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400100<p class="firstline">Updates a job in a project.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700103<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#submit">submit(projectId, region, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800106<p class="firstline">Submits a job to a cluster.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#submitAsOperation">submitAsOperation(projectId, region, body=None, x__xgafv=None)</a></code></p>
109<p class="firstline">Submits job to a cluster.</p>
110<p class="toc_element">
111 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112<p class="firstline">Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800113<h3>Method Details</h3>
114<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700115 <code class="details" id="cancel">cancel(projectId, region, jobId, body=None, x__xgafv=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -0700116 <pre>Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs.list (https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/list) or regions/{region}/jobs.get (https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/get).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800117
118Args:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400119 projectId: string, Required. The ID of the Google Cloud Platform project that the job belongs to. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 region: string, Required. The Dataproc region in which to handle the request. (required)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400121 jobId: string, Required. The job ID. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700122 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800123 The object takes the form of:
124
125{ # A request to cancel a job.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800126}
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800127
128 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400129 Allowed values
130 1 - v1 error format
131 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800132
133Returns:
134 An object of the form:
135
Dan O'Mearadd494642020-05-01 07:42:23 -0700136 { # A Dataproc job resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800137 &quot;done&quot;: True or False, # Output only. Indicates whether the job is completed. If the value is false, the job is still in progress. If true, the job is completed, and status.state field will indicate if it was successful, failed, or cancelled.
138 &quot;driverControlFilesUri&quot;: &quot;A String&quot;, # Output only. If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as driver_output_uri.
139 &quot;driverOutputResourceUri&quot;: &quot;A String&quot;, # Output only. A URI pointing to the location of the stdout of the job&#x27;s driver program.
140 &quot;hadoopJob&quot;: { # A Dataproc job for running Apache Hadoop MapReduce (https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) jobs on Apache Hadoop YARN (https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). # Optional. Job is a Hadoop job.
141 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip.
142 &quot;A String&quot;,
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800143 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800144 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
145 &quot;A String&quot;,
146 ],
147 &quot;fileUris&quot;: [ # Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks.
148 &quot;A String&quot;,
149 ],
150 &quot;jarFileUris&quot;: [ # Optional. Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks.
151 &quot;A String&quot;,
152 ],
153 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
154 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
155 &quot;a_key&quot;: &quot;A String&quot;,
156 },
157 },
158 &quot;mainClass&quot;: &quot;A String&quot;, # The name of the driver&#x27;s main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris.
159 &quot;mainJarFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the jar file containing the main class. Examples: &#x27;gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar&#x27; &#x27;hdfs:/tmp/test-samples/custom-wordcount.jar&#x27; &#x27;file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar&#x27;
160 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800161 &quot;a_key&quot;: &quot;A String&quot;,
162 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800163 },
164 &quot;hiveJob&quot;: { # A Dataproc job for running Apache Hive (https://hive.apache.org/) queries on YARN. # Optional. Job is a Hive job.
165 &quot;continueOnFailure&quot;: True or False, # Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
166 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.
167 &quot;A String&quot;,
168 ],
169 &quot;properties&quot;: { # Optional. A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.
170 &quot;a_key&quot;: &quot;A String&quot;,
171 },
172 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains Hive queries.
173 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
174 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
175 &quot;A String&quot;,
176 ],
177 },
178 &quot;scriptVariables&quot;: { # Optional. Mapping of query variable names to values (equivalent to the Hive command: SET name=&quot;value&quot;;).
179 &quot;a_key&quot;: &quot;A String&quot;,
180 },
181 },
182 &quot;jobUuid&quot;: &quot;A String&quot;, # Output only. A UUID that uniquely identifies a job within the project over time. This is in contrast to a user-settable reference.job_id that may be reused over time.
183 &quot;labels&quot;: { # Optional. The labels to associate with this job. 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 job.
184 &quot;a_key&quot;: &quot;A String&quot;,
185 },
186 &quot;pigJob&quot;: { # A Dataproc job for running Apache Pig (https://pig.apache.org/) queries on YARN. # Optional. Job is a Pig job.
187 &quot;continueOnFailure&quot;: True or False, # Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
188 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
189 &quot;A String&quot;,
190 ],
191 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
192 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
193 &quot;a_key&quot;: &quot;A String&quot;,
194 },
195 },
196 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.
197 &quot;a_key&quot;: &quot;A String&quot;,
198 },
199 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains the Pig queries.
200 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
201 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
202 &quot;A String&quot;,
203 ],
204 },
205 &quot;scriptVariables&quot;: { # Optional. Mapping of query variable names to values (equivalent to the Pig command: name=[value]).
206 &quot;a_key&quot;: &quot;A String&quot;,
207 },
208 },
209 &quot;placement&quot;: { # Dataproc job config. # Required. Job information, including how, when, and where to run the job.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800210 &quot;clusterLabels&quot;: { # Optional. Cluster labels to identify a cluster where the job will be submitted.
211 &quot;a_key&quot;: &quot;A String&quot;,
212 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800213 &quot;clusterName&quot;: &quot;A String&quot;, # Required. The name of the cluster where the job will be submitted.
214 &quot;clusterUuid&quot;: &quot;A String&quot;, # Output only. A cluster UUID generated by the Dataproc service when the job is submitted.
215 },
216 &quot;prestoJob&quot;: { # A Dataproc job for running Presto (https://prestosql.io/) queries. IMPORTANT: The Dataproc Presto Optional Component (https://cloud.google.com/dataproc/docs/concepts/components/presto) must be enabled when the cluster is created to submit a Presto job to the cluster. # Optional. Job is a Presto job.
217 &quot;clientTags&quot;: [ # Optional. Presto client tags to attach to this query
218 &quot;A String&quot;,
219 ],
220 &quot;continueOnFailure&quot;: True or False, # Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
221 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
222 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
223 &quot;a_key&quot;: &quot;A String&quot;,
224 },
225 },
226 &quot;outputFormat&quot;: &quot;A String&quot;, # Optional. The format in which query output will be displayed. See the Presto documentation for supported output formats
227 &quot;properties&quot;: { # Optional. A mapping of property names to values. Used to set Presto session properties (https://prestodb.io/docs/current/sql/set-session.html) Equivalent to using the --session flag in the Presto CLI
228 &quot;a_key&quot;: &quot;A String&quot;,
229 },
230 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains SQL queries.
231 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
232 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
233 &quot;A String&quot;,
234 ],
235 },
236 },
237 &quot;pysparkJob&quot;: { # A Dataproc job for running Apache PySpark (https://spark.apache.org/docs/0.9.0/python-programming-guide.html) applications on YARN. # Optional. Job is a PySpark job.
238 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
239 &quot;A String&quot;,
240 ],
241 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
242 &quot;A String&quot;,
243 ],
244 &quot;fileUris&quot;: [ # Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks.
245 &quot;A String&quot;,
246 ],
247 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks.
248 &quot;A String&quot;,
249 ],
250 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
251 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
252 &quot;a_key&quot;: &quot;A String&quot;,
253 },
254 },
255 &quot;mainPythonFileUri&quot;: &quot;A String&quot;, # Required. The HCFS URI of the main Python file to use as the driver. Must be a .py file.
256 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.
257 &quot;a_key&quot;: &quot;A String&quot;,
258 },
259 &quot;pythonFileUris&quot;: [ # Optional. HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip.
260 &quot;A String&quot;,
261 ],
262 },
263 &quot;reference&quot;: { # Encapsulates the full scoping used to reference a job. # Optional. The fully qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not specified when a job is created, the server generates a job_id.
264 &quot;jobId&quot;: &quot;A String&quot;, # Optional. The job ID, which must be unique within the project.The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 100 characters.If not specified by the caller, the job ID will be provided by the server.
265 &quot;projectId&quot;: &quot;A String&quot;, # Optional. The ID of the Google Cloud Platform project that the job belongs to. If specified, must match the request project ID.
266 },
267 &quot;scheduling&quot;: { # Job scheduling options. # Optional. Job scheduling configuration.
268 &quot;maxFailuresPerHour&quot;: 42, # Optional. Maximum number of times per hour a driver may be restarted as a result of driver exiting with non-zero code before job is reported failed.A job may be reported as thrashing if driver exits with non-zero code 4 times within 10 minute window.Maximum value is 10.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800269 &quot;maxFailuresTotal&quot;: 42, # Optional. Maximum number of times in total a driver may be restarted as a result of driver exiting with non-zero code before job is reported failed. Maximum value is 240.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800270 },
271 &quot;sparkJob&quot;: { # A Dataproc job for running Apache Spark (http://spark.apache.org/) applications on YARN. # Optional. Job is a Spark job.
272 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
273 &quot;A String&quot;,
274 ],
275 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
276 &quot;A String&quot;,
277 ],
278 &quot;fileUris&quot;: [ # Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks.
279 &quot;A String&quot;,
280 ],
281 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks.
282 &quot;A String&quot;,
283 ],
284 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
285 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
286 &quot;a_key&quot;: &quot;A String&quot;,
287 },
288 },
289 &quot;mainClass&quot;: &quot;A String&quot;, # The name of the driver&#x27;s main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris.
290 &quot;mainJarFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the jar file that contains the main class.
291 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.
292 &quot;a_key&quot;: &quot;A String&quot;,
293 },
294 },
295 &quot;sparkRJob&quot;: { # A Dataproc job for running Apache SparkR (https://spark.apache.org/docs/latest/sparkr.html) applications on YARN. # Optional. Job is a SparkR job.
296 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
297 &quot;A String&quot;,
298 ],
299 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
300 &quot;A String&quot;,
301 ],
302 &quot;fileUris&quot;: [ # Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks.
303 &quot;A String&quot;,
304 ],
305 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
306 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
307 &quot;a_key&quot;: &quot;A String&quot;,
308 },
309 },
310 &quot;mainRFileUri&quot;: &quot;A String&quot;, # Required. The HCFS URI of the main R file to use as the driver. Must be a .R file.
311 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure SparkR. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.
312 &quot;a_key&quot;: &quot;A String&quot;,
313 },
314 },
315 &quot;sparkSqlJob&quot;: { # A Dataproc job for running Apache Spark SQL (http://spark.apache.org/sql/) queries. # Optional. Job is a SparkSql job.
316 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
317 &quot;A String&quot;,
318 ],
319 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
320 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
321 &quot;a_key&quot;: &quot;A String&quot;,
322 },
323 },
324 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Spark SQL&#x27;s SparkConf. Properties that conflict with values set by the Dataproc API may be overwritten.
325 &quot;a_key&quot;: &quot;A String&quot;,
326 },
327 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains SQL queries.
328 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
329 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
330 &quot;A String&quot;,
331 ],
332 },
333 &quot;scriptVariables&quot;: { # Optional. Mapping of query variable names to values (equivalent to the Spark SQL command: SET name=&quot;value&quot;;).
334 &quot;a_key&quot;: &quot;A String&quot;,
335 },
336 },
337 &quot;status&quot;: { # Dataproc job status. # Output only. The job status. Additional application-specific status information may be contained in the type_job and yarn_applications fields.
338 &quot;details&quot;: &quot;A String&quot;, # Optional. Output only. Job state details, such as an error description if the state is ERROR.
339 &quot;state&quot;: &quot;A String&quot;, # Output only. A state message specifying the overall job state.
340 &quot;stateStartTime&quot;: &quot;A String&quot;, # Output only. The time when this state was entered.
341 &quot;substate&quot;: &quot;A String&quot;, # Output only. Additional state information, which includes status reported by the agent.
342 },
343 &quot;statusHistory&quot;: [ # Output only. The previous job status.
344 { # Dataproc job status.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800345 &quot;details&quot;: &quot;A String&quot;, # Optional. Output only. Job state details, such as an error description if the state is ERROR.
346 &quot;state&quot;: &quot;A String&quot;, # Output only. A state message specifying the overall job state.
347 &quot;stateStartTime&quot;: &quot;A String&quot;, # Output only. The time when this state was entered.
348 &quot;substate&quot;: &quot;A String&quot;, # Output only. Additional state information, which includes status reported by the agent.
349 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800350 ],
351 &quot;yarnApplications&quot;: [ # Output only. The collection of YARN applications spun up by this job.Beta Feature: This report is available for testing purposes only. It may be changed before final release.
352 { # A YARN application created by a job. Application information is a subset of org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto.Beta Feature: This report is available for testing purposes only. It may be changed before final release.
353 &quot;name&quot;: &quot;A String&quot;, # Required. The application name.
354 &quot;progress&quot;: 3.14, # Required. The numerical progress of the application, from 1 to 100.
355 &quot;state&quot;: &quot;A String&quot;, # Required. The application state.
356 &quot;trackingUrl&quot;: &quot;A String&quot;, # Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800357 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800358 ],
359}</pre>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700360</div>
361
362<div class="method">
363 <code class="details" id="close">close()</code>
364 <pre>Close httplib2 connections.</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800365</div>
366
367<div class="method">
368 <code class="details" id="delete">delete(projectId, region, jobId, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400369 <pre>Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800370
371Args:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400372 projectId: string, Required. The ID of the Google Cloud Platform project that the job belongs to. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700373 region: string, Required. The Dataproc region in which to handle the request. (required)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400374 jobId: string, Required. The job ID. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800375 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400376 Allowed values
377 1 - v1 error format
378 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800379
380Returns:
381 An object of the form:
382
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700383 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for Empty is empty JSON object {}.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800384}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800385</div>
386
387<div class="method">
388 <code class="details" id="get">get(projectId, region, jobId, x__xgafv=None)</code>
389 <pre>Gets the resource representation for a job in a project.
390
391Args:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400392 projectId: string, Required. The ID of the Google Cloud Platform project that the job belongs to. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700393 region: string, Required. The Dataproc region in which to handle the request. (required)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400394 jobId: string, Required. The job ID. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800395 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400396 Allowed values
397 1 - v1 error format
398 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800399
400Returns:
401 An object of the form:
402
Dan O'Mearadd494642020-05-01 07:42:23 -0700403 { # A Dataproc job resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800404 &quot;done&quot;: True or False, # Output only. Indicates whether the job is completed. If the value is false, the job is still in progress. If true, the job is completed, and status.state field will indicate if it was successful, failed, or cancelled.
405 &quot;driverControlFilesUri&quot;: &quot;A String&quot;, # Output only. If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as driver_output_uri.
406 &quot;driverOutputResourceUri&quot;: &quot;A String&quot;, # Output only. A URI pointing to the location of the stdout of the job&#x27;s driver program.
407 &quot;hadoopJob&quot;: { # A Dataproc job for running Apache Hadoop MapReduce (https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) jobs on Apache Hadoop YARN (https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). # Optional. Job is a Hadoop job.
408 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip.
409 &quot;A String&quot;,
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800410 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800411 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
412 &quot;A String&quot;,
413 ],
414 &quot;fileUris&quot;: [ # Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks.
415 &quot;A String&quot;,
416 ],
417 &quot;jarFileUris&quot;: [ # Optional. Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks.
418 &quot;A String&quot;,
419 ],
420 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
421 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
422 &quot;a_key&quot;: &quot;A String&quot;,
423 },
424 },
425 &quot;mainClass&quot;: &quot;A String&quot;, # The name of the driver&#x27;s main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris.
426 &quot;mainJarFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the jar file containing the main class. Examples: &#x27;gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar&#x27; &#x27;hdfs:/tmp/test-samples/custom-wordcount.jar&#x27; &#x27;file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar&#x27;
427 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800428 &quot;a_key&quot;: &quot;A String&quot;,
429 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800430 },
431 &quot;hiveJob&quot;: { # A Dataproc job for running Apache Hive (https://hive.apache.org/) queries on YARN. # Optional. Job is a Hive job.
432 &quot;continueOnFailure&quot;: True or False, # Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
433 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.
434 &quot;A String&quot;,
435 ],
436 &quot;properties&quot;: { # Optional. A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.
437 &quot;a_key&quot;: &quot;A String&quot;,
438 },
439 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains Hive queries.
440 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
441 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
442 &quot;A String&quot;,
443 ],
444 },
445 &quot;scriptVariables&quot;: { # Optional. Mapping of query variable names to values (equivalent to the Hive command: SET name=&quot;value&quot;;).
446 &quot;a_key&quot;: &quot;A String&quot;,
447 },
448 },
449 &quot;jobUuid&quot;: &quot;A String&quot;, # Output only. A UUID that uniquely identifies a job within the project over time. This is in contrast to a user-settable reference.job_id that may be reused over time.
450 &quot;labels&quot;: { # Optional. The labels to associate with this job. 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 job.
451 &quot;a_key&quot;: &quot;A String&quot;,
452 },
453 &quot;pigJob&quot;: { # A Dataproc job for running Apache Pig (https://pig.apache.org/) queries on YARN. # Optional. Job is a Pig job.
454 &quot;continueOnFailure&quot;: True or False, # Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
455 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
456 &quot;A String&quot;,
457 ],
458 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
459 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
460 &quot;a_key&quot;: &quot;A String&quot;,
461 },
462 },
463 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.
464 &quot;a_key&quot;: &quot;A String&quot;,
465 },
466 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains the Pig queries.
467 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
468 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
469 &quot;A String&quot;,
470 ],
471 },
472 &quot;scriptVariables&quot;: { # Optional. Mapping of query variable names to values (equivalent to the Pig command: name=[value]).
473 &quot;a_key&quot;: &quot;A String&quot;,
474 },
475 },
476 &quot;placement&quot;: { # Dataproc job config. # Required. Job information, including how, when, and where to run the job.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800477 &quot;clusterLabels&quot;: { # Optional. Cluster labels to identify a cluster where the job will be submitted.
478 &quot;a_key&quot;: &quot;A String&quot;,
479 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800480 &quot;clusterName&quot;: &quot;A String&quot;, # Required. The name of the cluster where the job will be submitted.
481 &quot;clusterUuid&quot;: &quot;A String&quot;, # Output only. A cluster UUID generated by the Dataproc service when the job is submitted.
482 },
483 &quot;prestoJob&quot;: { # A Dataproc job for running Presto (https://prestosql.io/) queries. IMPORTANT: The Dataproc Presto Optional Component (https://cloud.google.com/dataproc/docs/concepts/components/presto) must be enabled when the cluster is created to submit a Presto job to the cluster. # Optional. Job is a Presto job.
484 &quot;clientTags&quot;: [ # Optional. Presto client tags to attach to this query
485 &quot;A String&quot;,
486 ],
487 &quot;continueOnFailure&quot;: True or False, # Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
488 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
489 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
490 &quot;a_key&quot;: &quot;A String&quot;,
491 },
492 },
493 &quot;outputFormat&quot;: &quot;A String&quot;, # Optional. The format in which query output will be displayed. See the Presto documentation for supported output formats
494 &quot;properties&quot;: { # Optional. A mapping of property names to values. Used to set Presto session properties (https://prestodb.io/docs/current/sql/set-session.html) Equivalent to using the --session flag in the Presto CLI
495 &quot;a_key&quot;: &quot;A String&quot;,
496 },
497 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains SQL queries.
498 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
499 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
500 &quot;A String&quot;,
501 ],
502 },
503 },
504 &quot;pysparkJob&quot;: { # A Dataproc job for running Apache PySpark (https://spark.apache.org/docs/0.9.0/python-programming-guide.html) applications on YARN. # Optional. Job is a PySpark job.
505 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
506 &quot;A String&quot;,
507 ],
508 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
509 &quot;A String&quot;,
510 ],
511 &quot;fileUris&quot;: [ # Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks.
512 &quot;A String&quot;,
513 ],
514 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks.
515 &quot;A String&quot;,
516 ],
517 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
518 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
519 &quot;a_key&quot;: &quot;A String&quot;,
520 },
521 },
522 &quot;mainPythonFileUri&quot;: &quot;A String&quot;, # Required. The HCFS URI of the main Python file to use as the driver. Must be a .py file.
523 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.
524 &quot;a_key&quot;: &quot;A String&quot;,
525 },
526 &quot;pythonFileUris&quot;: [ # Optional. HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip.
527 &quot;A String&quot;,
528 ],
529 },
530 &quot;reference&quot;: { # Encapsulates the full scoping used to reference a job. # Optional. The fully qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not specified when a job is created, the server generates a job_id.
531 &quot;jobId&quot;: &quot;A String&quot;, # Optional. The job ID, which must be unique within the project.The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 100 characters.If not specified by the caller, the job ID will be provided by the server.
532 &quot;projectId&quot;: &quot;A String&quot;, # Optional. The ID of the Google Cloud Platform project that the job belongs to. If specified, must match the request project ID.
533 },
534 &quot;scheduling&quot;: { # Job scheduling options. # Optional. Job scheduling configuration.
535 &quot;maxFailuresPerHour&quot;: 42, # Optional. Maximum number of times per hour a driver may be restarted as a result of driver exiting with non-zero code before job is reported failed.A job may be reported as thrashing if driver exits with non-zero code 4 times within 10 minute window.Maximum value is 10.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800536 &quot;maxFailuresTotal&quot;: 42, # Optional. Maximum number of times in total a driver may be restarted as a result of driver exiting with non-zero code before job is reported failed. Maximum value is 240.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800537 },
538 &quot;sparkJob&quot;: { # A Dataproc job for running Apache Spark (http://spark.apache.org/) applications on YARN. # Optional. Job is a Spark job.
539 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
540 &quot;A String&quot;,
541 ],
542 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
543 &quot;A String&quot;,
544 ],
545 &quot;fileUris&quot;: [ # Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks.
546 &quot;A String&quot;,
547 ],
548 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks.
549 &quot;A String&quot;,
550 ],
551 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
552 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
553 &quot;a_key&quot;: &quot;A String&quot;,
554 },
555 },
556 &quot;mainClass&quot;: &quot;A String&quot;, # The name of the driver&#x27;s main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris.
557 &quot;mainJarFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the jar file that contains the main class.
558 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.
559 &quot;a_key&quot;: &quot;A String&quot;,
560 },
561 },
562 &quot;sparkRJob&quot;: { # A Dataproc job for running Apache SparkR (https://spark.apache.org/docs/latest/sparkr.html) applications on YARN. # Optional. Job is a SparkR job.
563 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
564 &quot;A String&quot;,
565 ],
566 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
567 &quot;A String&quot;,
568 ],
569 &quot;fileUris&quot;: [ # Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks.
570 &quot;A String&quot;,
571 ],
572 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
573 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
574 &quot;a_key&quot;: &quot;A String&quot;,
575 },
576 },
577 &quot;mainRFileUri&quot;: &quot;A String&quot;, # Required. The HCFS URI of the main R file to use as the driver. Must be a .R file.
578 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure SparkR. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.
579 &quot;a_key&quot;: &quot;A String&quot;,
580 },
581 },
582 &quot;sparkSqlJob&quot;: { # A Dataproc job for running Apache Spark SQL (http://spark.apache.org/sql/) queries. # Optional. Job is a SparkSql job.
583 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
584 &quot;A String&quot;,
585 ],
586 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
587 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
588 &quot;a_key&quot;: &quot;A String&quot;,
589 },
590 },
591 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Spark SQL&#x27;s SparkConf. Properties that conflict with values set by the Dataproc API may be overwritten.
592 &quot;a_key&quot;: &quot;A String&quot;,
593 },
594 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains SQL queries.
595 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
596 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
597 &quot;A String&quot;,
598 ],
599 },
600 &quot;scriptVariables&quot;: { # Optional. Mapping of query variable names to values (equivalent to the Spark SQL command: SET name=&quot;value&quot;;).
601 &quot;a_key&quot;: &quot;A String&quot;,
602 },
603 },
604 &quot;status&quot;: { # Dataproc job status. # Output only. The job status. Additional application-specific status information may be contained in the type_job and yarn_applications fields.
605 &quot;details&quot;: &quot;A String&quot;, # Optional. Output only. Job state details, such as an error description if the state is ERROR.
606 &quot;state&quot;: &quot;A String&quot;, # Output only. A state message specifying the overall job state.
607 &quot;stateStartTime&quot;: &quot;A String&quot;, # Output only. The time when this state was entered.
608 &quot;substate&quot;: &quot;A String&quot;, # Output only. Additional state information, which includes status reported by the agent.
609 },
610 &quot;statusHistory&quot;: [ # Output only. The previous job status.
611 { # Dataproc job status.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800612 &quot;details&quot;: &quot;A String&quot;, # Optional. Output only. Job state details, such as an error description if the state is ERROR.
613 &quot;state&quot;: &quot;A String&quot;, # Output only. A state message specifying the overall job state.
614 &quot;stateStartTime&quot;: &quot;A String&quot;, # Output only. The time when this state was entered.
615 &quot;substate&quot;: &quot;A String&quot;, # Output only. Additional state information, which includes status reported by the agent.
616 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800617 ],
618 &quot;yarnApplications&quot;: [ # Output only. The collection of YARN applications spun up by this job.Beta Feature: This report is available for testing purposes only. It may be changed before final release.
619 { # A YARN application created by a job. Application information is a subset of org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto.Beta Feature: This report is available for testing purposes only. It may be changed before final release.
620 &quot;name&quot;: &quot;A String&quot;, # Required. The application name.
621 &quot;progress&quot;: 3.14, # Required. The numerical progress of the application, from 1 to 100.
622 &quot;state&quot;: &quot;A String&quot;, # Required. The application state.
623 &quot;trackingUrl&quot;: &quot;A String&quot;, # Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800624 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800625 ],
626}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800627</div>
628
629<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700630 <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code>
631 <pre>Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
632
633Args:
634 resource: string, REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. (required)
635 body: object, The request body.
636 The object takes the form of:
637
638{ # Request message for GetIamPolicy method.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800639 &quot;options&quot;: { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A GetPolicyOptions object for specifying options to GetIamPolicy.
640 &quot;requestedPolicyVersion&quot;: 42, # Optional. The policy format version to be returned.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).
641 },
642}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700643
644 x__xgafv: string, V1 error format.
645 Allowed values
646 1 - v1 error format
647 2 - v2 error format
648
649Returns:
650 An object of the form:
651
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700652 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.A Policy is a collection of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role.For some types of Google Cloud resources, a binding can also specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).JSON example: { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } YAML example: bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the IAM documentation (https://cloud.google.com/iam/docs/).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800653 &quot;bindings&quot;: [ # Associates a list of members to a role. Optionally, may specify a condition that determines how and when the bindings are applied. Each of the bindings must contain at least one member.
654 { # Associates members with a role.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800655 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec.Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding.If the condition evaluates to true, then this binding applies to the current request.If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).
656 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
657 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
658 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
659 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700660 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800661 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. members can have the following values: allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account. allAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account. user:{emailid}: An email address that represents a specific Google account. For example, alice@example.com . serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com. group:{emailid}: An email address that represents a Google group. For example, admins@example.com. deleted:user:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a user that has been recently deleted. For example, alice@example.com?uid=123456789012345678901. If the user is recovered, this value reverts to user:{emailid} and the recovered user retains the role in the binding. deleted:serviceAccount:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901. If the service account is undeleted, this value reverts to serviceAccount:{emailid} and the undeleted service account retains the role in the binding. deleted:group:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, admins@example.com?uid=123456789012345678901. If the group is recovered, this value reverts to group:{emailid} and the recovered group retains the role in the binding. domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com.
662 &quot;A String&quot;,
663 ],
664 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner.
665 },
666 ],
667 &quot;etag&quot;: &quot;A String&quot;, # etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An etag is returned in the response to getIamPolicy, and systems are expected to put that etag in the request to setIamPolicy to ensure that their change will be applied to the same version of the policy.Important: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.
668 &quot;version&quot;: 42, # Specifies the format of the policy.Valid values are 0, 1, and 3. Requests that specify an invalid value are rejected.Any operation that affects conditional role bindings must specify version 3. This requirement applies to the following operations: Getting a policy that includes a conditional role binding Adding a conditional role binding to a policy Changing a conditional role binding in a policy Removing any role binding, with or without a condition, from a policy that includes conditionsImportant: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).
669}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700670</div>
671
672<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800673 <code class="details" id="list">list(projectId, region, clusterName=None, filter=None, jobStateMatcher=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800674 <pre>Lists regions/{region}/jobs in a project.
675
676Args:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400677 projectId: string, Required. The ID of the Google Cloud Platform project that the job belongs to. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700678 region: string, Required. The Dataproc region in which to handle the request. (required)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800679 clusterName: string, Optional. If set, the returned jobs list includes only jobs that were submitted to the named cluster.
680 filter: string, Optional. A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is status.state or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be either ACTIVE or NON_ACTIVE. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND labels.env = staging AND labels.starred = *
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700681 jobStateMatcher: string, Optional. Specifies enumerated categories of jobs to list. (default = match ALL jobs).If filter is provided, jobStateMatcher will be ignored.
682 Allowed values
683 ALL - Match all jobs, regardless of state.
684 ACTIVE - Only match jobs in non-terminal states: PENDING, RUNNING, or CANCEL_PENDING.
685 NON_ACTIVE - Only match jobs in terminal states: CANCELLED, DONE, or ERROR.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800686 pageSize: integer, Optional. The number of results to return in each response.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800687 pageToken: string, Optional. The page token, returned by a previous call, to request the next page of results.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800688 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400689 Allowed values
690 1 - v1 error format
691 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800692
693Returns:
694 An object of the form:
695
696 { # A list of jobs in a project.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800697 &quot;jobs&quot;: [ # Output only. Jobs list.
698 { # A Dataproc job resource.
699 &quot;done&quot;: True or False, # Output only. Indicates whether the job is completed. If the value is false, the job is still in progress. If true, the job is completed, and status.state field will indicate if it was successful, failed, or cancelled.
700 &quot;driverControlFilesUri&quot;: &quot;A String&quot;, # Output only. If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as driver_output_uri.
701 &quot;driverOutputResourceUri&quot;: &quot;A String&quot;, # Output only. A URI pointing to the location of the stdout of the job&#x27;s driver program.
702 &quot;hadoopJob&quot;: { # A Dataproc job for running Apache Hadoop MapReduce (https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) jobs on Apache Hadoop YARN (https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). # Optional. Job is a Hadoop job.
703 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip.
704 &quot;A String&quot;,
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800705 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800706 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
707 &quot;A String&quot;,
708 ],
709 &quot;fileUris&quot;: [ # Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks.
710 &quot;A String&quot;,
711 ],
712 &quot;jarFileUris&quot;: [ # Optional. Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks.
713 &quot;A String&quot;,
714 ],
715 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
716 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
717 &quot;a_key&quot;: &quot;A String&quot;,
718 },
719 },
720 &quot;mainClass&quot;: &quot;A String&quot;, # The name of the driver&#x27;s main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris.
721 &quot;mainJarFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the jar file containing the main class. Examples: &#x27;gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar&#x27; &#x27;hdfs:/tmp/test-samples/custom-wordcount.jar&#x27; &#x27;file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar&#x27;
722 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800723 &quot;a_key&quot;: &quot;A String&quot;,
724 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800725 },
726 &quot;hiveJob&quot;: { # A Dataproc job for running Apache Hive (https://hive.apache.org/) queries on YARN. # Optional. Job is a Hive job.
727 &quot;continueOnFailure&quot;: True or False, # Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
728 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.
729 &quot;A String&quot;,
730 ],
731 &quot;properties&quot;: { # Optional. A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.
732 &quot;a_key&quot;: &quot;A String&quot;,
733 },
734 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains Hive queries.
735 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
736 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
737 &quot;A String&quot;,
738 ],
739 },
740 &quot;scriptVariables&quot;: { # Optional. Mapping of query variable names to values (equivalent to the Hive command: SET name=&quot;value&quot;;).
741 &quot;a_key&quot;: &quot;A String&quot;,
742 },
743 },
744 &quot;jobUuid&quot;: &quot;A String&quot;, # Output only. A UUID that uniquely identifies a job within the project over time. This is in contrast to a user-settable reference.job_id that may be reused over time.
745 &quot;labels&quot;: { # Optional. The labels to associate with this job. 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 job.
746 &quot;a_key&quot;: &quot;A String&quot;,
747 },
748 &quot;pigJob&quot;: { # A Dataproc job for running Apache Pig (https://pig.apache.org/) queries on YARN. # Optional. Job is a Pig job.
749 &quot;continueOnFailure&quot;: True or False, # Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
750 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
751 &quot;A String&quot;,
752 ],
753 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
754 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
755 &quot;a_key&quot;: &quot;A String&quot;,
756 },
757 },
758 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.
759 &quot;a_key&quot;: &quot;A String&quot;,
760 },
761 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains the Pig queries.
762 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
763 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
764 &quot;A String&quot;,
765 ],
766 },
767 &quot;scriptVariables&quot;: { # Optional. Mapping of query variable names to values (equivalent to the Pig command: name=[value]).
768 &quot;a_key&quot;: &quot;A String&quot;,
769 },
770 },
771 &quot;placement&quot;: { # Dataproc job config. # Required. Job information, including how, when, and where to run the job.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800772 &quot;clusterLabels&quot;: { # Optional. Cluster labels to identify a cluster where the job will be submitted.
773 &quot;a_key&quot;: &quot;A String&quot;,
774 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800775 &quot;clusterName&quot;: &quot;A String&quot;, # Required. The name of the cluster where the job will be submitted.
776 &quot;clusterUuid&quot;: &quot;A String&quot;, # Output only. A cluster UUID generated by the Dataproc service when the job is submitted.
777 },
778 &quot;prestoJob&quot;: { # A Dataproc job for running Presto (https://prestosql.io/) queries. IMPORTANT: The Dataproc Presto Optional Component (https://cloud.google.com/dataproc/docs/concepts/components/presto) must be enabled when the cluster is created to submit a Presto job to the cluster. # Optional. Job is a Presto job.
779 &quot;clientTags&quot;: [ # Optional. Presto client tags to attach to this query
780 &quot;A String&quot;,
781 ],
782 &quot;continueOnFailure&quot;: True or False, # Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
783 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
784 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
785 &quot;a_key&quot;: &quot;A String&quot;,
786 },
787 },
788 &quot;outputFormat&quot;: &quot;A String&quot;, # Optional. The format in which query output will be displayed. See the Presto documentation for supported output formats
789 &quot;properties&quot;: { # Optional. A mapping of property names to values. Used to set Presto session properties (https://prestodb.io/docs/current/sql/set-session.html) Equivalent to using the --session flag in the Presto CLI
790 &quot;a_key&quot;: &quot;A String&quot;,
791 },
792 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains SQL queries.
793 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
794 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
795 &quot;A String&quot;,
796 ],
797 },
798 },
799 &quot;pysparkJob&quot;: { # A Dataproc job for running Apache PySpark (https://spark.apache.org/docs/0.9.0/python-programming-guide.html) applications on YARN. # Optional. Job is a PySpark job.
800 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
801 &quot;A String&quot;,
802 ],
803 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
804 &quot;A String&quot;,
805 ],
806 &quot;fileUris&quot;: [ # Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks.
807 &quot;A String&quot;,
808 ],
809 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks.
810 &quot;A String&quot;,
811 ],
812 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
813 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
814 &quot;a_key&quot;: &quot;A String&quot;,
815 },
816 },
817 &quot;mainPythonFileUri&quot;: &quot;A String&quot;, # Required. The HCFS URI of the main Python file to use as the driver. Must be a .py file.
818 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.
819 &quot;a_key&quot;: &quot;A String&quot;,
820 },
821 &quot;pythonFileUris&quot;: [ # Optional. HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip.
822 &quot;A String&quot;,
823 ],
824 },
825 &quot;reference&quot;: { # Encapsulates the full scoping used to reference a job. # Optional. The fully qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not specified when a job is created, the server generates a job_id.
826 &quot;jobId&quot;: &quot;A String&quot;, # Optional. The job ID, which must be unique within the project.The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 100 characters.If not specified by the caller, the job ID will be provided by the server.
827 &quot;projectId&quot;: &quot;A String&quot;, # Optional. The ID of the Google Cloud Platform project that the job belongs to. If specified, must match the request project ID.
828 },
829 &quot;scheduling&quot;: { # Job scheduling options. # Optional. Job scheduling configuration.
830 &quot;maxFailuresPerHour&quot;: 42, # Optional. Maximum number of times per hour a driver may be restarted as a result of driver exiting with non-zero code before job is reported failed.A job may be reported as thrashing if driver exits with non-zero code 4 times within 10 minute window.Maximum value is 10.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800831 &quot;maxFailuresTotal&quot;: 42, # Optional. Maximum number of times in total a driver may be restarted as a result of driver exiting with non-zero code before job is reported failed. Maximum value is 240.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800832 },
833 &quot;sparkJob&quot;: { # A Dataproc job for running Apache Spark (http://spark.apache.org/) applications on YARN. # Optional. Job is a Spark job.
834 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
835 &quot;A String&quot;,
836 ],
837 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
838 &quot;A String&quot;,
839 ],
840 &quot;fileUris&quot;: [ # Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks.
841 &quot;A String&quot;,
842 ],
843 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks.
844 &quot;A String&quot;,
845 ],
846 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
847 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
848 &quot;a_key&quot;: &quot;A String&quot;,
849 },
850 },
851 &quot;mainClass&quot;: &quot;A String&quot;, # The name of the driver&#x27;s main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris.
852 &quot;mainJarFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the jar file that contains the main class.
853 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.
854 &quot;a_key&quot;: &quot;A String&quot;,
855 },
856 },
857 &quot;sparkRJob&quot;: { # A Dataproc job for running Apache SparkR (https://spark.apache.org/docs/latest/sparkr.html) applications on YARN. # Optional. Job is a SparkR job.
858 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
859 &quot;A String&quot;,
860 ],
861 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
862 &quot;A String&quot;,
863 ],
864 &quot;fileUris&quot;: [ # Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks.
865 &quot;A String&quot;,
866 ],
867 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
868 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
869 &quot;a_key&quot;: &quot;A String&quot;,
870 },
871 },
872 &quot;mainRFileUri&quot;: &quot;A String&quot;, # Required. The HCFS URI of the main R file to use as the driver. Must be a .R file.
873 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure SparkR. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.
874 &quot;a_key&quot;: &quot;A String&quot;,
875 },
876 },
877 &quot;sparkSqlJob&quot;: { # A Dataproc job for running Apache Spark SQL (http://spark.apache.org/sql/) queries. # Optional. Job is a SparkSql job.
878 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
879 &quot;A String&quot;,
880 ],
881 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
882 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
883 &quot;a_key&quot;: &quot;A String&quot;,
884 },
885 },
886 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Spark SQL&#x27;s SparkConf. Properties that conflict with values set by the Dataproc API may be overwritten.
887 &quot;a_key&quot;: &quot;A String&quot;,
888 },
889 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains SQL queries.
890 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
891 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
892 &quot;A String&quot;,
893 ],
894 },
895 &quot;scriptVariables&quot;: { # Optional. Mapping of query variable names to values (equivalent to the Spark SQL command: SET name=&quot;value&quot;;).
896 &quot;a_key&quot;: &quot;A String&quot;,
897 },
898 },
899 &quot;status&quot;: { # Dataproc job status. # Output only. The job status. Additional application-specific status information may be contained in the type_job and yarn_applications fields.
900 &quot;details&quot;: &quot;A String&quot;, # Optional. Output only. Job state details, such as an error description if the state is ERROR.
901 &quot;state&quot;: &quot;A String&quot;, # Output only. A state message specifying the overall job state.
902 &quot;stateStartTime&quot;: &quot;A String&quot;, # Output only. The time when this state was entered.
903 &quot;substate&quot;: &quot;A String&quot;, # Output only. Additional state information, which includes status reported by the agent.
904 },
905 &quot;statusHistory&quot;: [ # Output only. The previous job status.
906 { # Dataproc job status.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800907 &quot;details&quot;: &quot;A String&quot;, # Optional. Output only. Job state details, such as an error description if the state is ERROR.
908 &quot;state&quot;: &quot;A String&quot;, # Output only. A state message specifying the overall job state.
909 &quot;stateStartTime&quot;: &quot;A String&quot;, # Output only. The time when this state was entered.
910 &quot;substate&quot;: &quot;A String&quot;, # Output only. Additional state information, which includes status reported by the agent.
911 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800912 ],
913 &quot;yarnApplications&quot;: [ # Output only. The collection of YARN applications spun up by this job.Beta Feature: This report is available for testing purposes only. It may be changed before final release.
914 { # A YARN application created by a job. Application information is a subset of org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto.Beta Feature: This report is available for testing purposes only. It may be changed before final release.
915 &quot;name&quot;: &quot;A String&quot;, # Required. The application name.
916 &quot;progress&quot;: 3.14, # Required. The numerical progress of the application, from 1 to 100.
917 &quot;state&quot;: &quot;A String&quot;, # Required. The application state.
918 &quot;trackingUrl&quot;: &quot;A String&quot;, # Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800919 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800920 ],
921 },
922 ],
923 &quot;nextPageToken&quot;: &quot;A String&quot;, # Optional. This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the page_token in a subsequent ListJobsRequest.
924}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800925</div>
926
927<div class="method">
928 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
929 <pre>Retrieves the next page of results.
930
931Args:
932 previous_request: The request for the previous page. (required)
933 previous_response: The response from the request for the previous page. (required)
934
935Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700936 A request object that you can call &#x27;execute()&#x27; on to request the next
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800937 page. Returns None if there are no more items in the collection.
938 </pre>
939</div>
940
941<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700942 <code class="details" id="patch">patch(projectId, region, jobId, body=None, updateMask=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400943 <pre>Updates a job in a project.
944
945Args:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400946 projectId: string, Required. The ID of the Google Cloud Platform project that the job belongs to. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700947 region: string, Required. The Dataproc region in which to handle the request. (required)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400948 jobId: string, Required. The job ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700949 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400950 The object takes the form of:
951
Dan O'Mearadd494642020-05-01 07:42:23 -0700952{ # A Dataproc job resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800953 &quot;done&quot;: True or False, # Output only. Indicates whether the job is completed. If the value is false, the job is still in progress. If true, the job is completed, and status.state field will indicate if it was successful, failed, or cancelled.
954 &quot;driverControlFilesUri&quot;: &quot;A String&quot;, # Output only. If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as driver_output_uri.
955 &quot;driverOutputResourceUri&quot;: &quot;A String&quot;, # Output only. A URI pointing to the location of the stdout of the job&#x27;s driver program.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800956 &quot;hadoopJob&quot;: { # A Dataproc job for running Apache Hadoop MapReduce (https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) jobs on Apache Hadoop YARN (https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). # Optional. Job is a Hadoop job.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800957 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip.
958 &quot;A String&quot;,
959 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800960 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
961 &quot;A String&quot;,
962 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800963 &quot;fileUris&quot;: [ # Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks.
964 &quot;A String&quot;,
965 ],
966 &quot;jarFileUris&quot;: [ # Optional. Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks.
967 &quot;A String&quot;,
968 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800969 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
970 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800971 &quot;a_key&quot;: &quot;A String&quot;,
972 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800973 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800974 &quot;mainClass&quot;: &quot;A String&quot;, # The name of the driver&#x27;s main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris.
975 &quot;mainJarFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the jar file containing the main class. Examples: &#x27;gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar&#x27; &#x27;hdfs:/tmp/test-samples/custom-wordcount.jar&#x27; &#x27;file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar&#x27;
976 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code.
977 &quot;a_key&quot;: &quot;A String&quot;,
978 },
979 },
980 &quot;hiveJob&quot;: { # A Dataproc job for running Apache Hive (https://hive.apache.org/) queries on YARN. # Optional. Job is a Hive job.
981 &quot;continueOnFailure&quot;: True or False, # Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
982 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.
983 &quot;A String&quot;,
984 ],
985 &quot;properties&quot;: { # Optional. A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.
986 &quot;a_key&quot;: &quot;A String&quot;,
987 },
988 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains Hive queries.
989 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
990 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
991 &quot;A String&quot;,
992 ],
993 },
994 &quot;scriptVariables&quot;: { # Optional. Mapping of query variable names to values (equivalent to the Hive command: SET name=&quot;value&quot;;).
995 &quot;a_key&quot;: &quot;A String&quot;,
996 },
997 },
998 &quot;jobUuid&quot;: &quot;A String&quot;, # Output only. A UUID that uniquely identifies a job within the project over time. This is in contrast to a user-settable reference.job_id that may be reused over time.
999 &quot;labels&quot;: { # Optional. The labels to associate with this job. 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 job.
1000 &quot;a_key&quot;: &quot;A String&quot;,
1001 },
1002 &quot;pigJob&quot;: { # A Dataproc job for running Apache Pig (https://pig.apache.org/) queries on YARN. # Optional. Job is a Pig job.
1003 &quot;continueOnFailure&quot;: True or False, # Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
1004 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
1005 &quot;A String&quot;,
1006 ],
1007 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1008 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1009 &quot;a_key&quot;: &quot;A String&quot;,
1010 },
1011 },
1012 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.
1013 &quot;a_key&quot;: &quot;A String&quot;,
1014 },
1015 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains the Pig queries.
1016 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
1017 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
1018 &quot;A String&quot;,
1019 ],
1020 },
1021 &quot;scriptVariables&quot;: { # Optional. Mapping of query variable names to values (equivalent to the Pig command: name=[value]).
1022 &quot;a_key&quot;: &quot;A String&quot;,
1023 },
1024 },
1025 &quot;placement&quot;: { # Dataproc job config. # Required. Job information, including how, when, and where to run the job.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001026 &quot;clusterLabels&quot;: { # Optional. Cluster labels to identify a cluster where the job will be submitted.
1027 &quot;a_key&quot;: &quot;A String&quot;,
1028 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001029 &quot;clusterName&quot;: &quot;A String&quot;, # Required. The name of the cluster where the job will be submitted.
1030 &quot;clusterUuid&quot;: &quot;A String&quot;, # Output only. A cluster UUID generated by the Dataproc service when the job is submitted.
1031 },
1032 &quot;prestoJob&quot;: { # A Dataproc job for running Presto (https://prestosql.io/) queries. IMPORTANT: The Dataproc Presto Optional Component (https://cloud.google.com/dataproc/docs/concepts/components/presto) must be enabled when the cluster is created to submit a Presto job to the cluster. # Optional. Job is a Presto job.
1033 &quot;clientTags&quot;: [ # Optional. Presto client tags to attach to this query
1034 &quot;A String&quot;,
1035 ],
1036 &quot;continueOnFailure&quot;: True or False, # Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
1037 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1038 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1039 &quot;a_key&quot;: &quot;A String&quot;,
1040 },
1041 },
1042 &quot;outputFormat&quot;: &quot;A String&quot;, # Optional. The format in which query output will be displayed. See the Presto documentation for supported output formats
1043 &quot;properties&quot;: { # Optional. A mapping of property names to values. Used to set Presto session properties (https://prestodb.io/docs/current/sql/set-session.html) Equivalent to using the --session flag in the Presto CLI
1044 &quot;a_key&quot;: &quot;A String&quot;,
1045 },
1046 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains SQL queries.
1047 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
1048 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
1049 &quot;A String&quot;,
1050 ],
1051 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001052 },
1053 &quot;pysparkJob&quot;: { # A Dataproc job for running Apache PySpark (https://spark.apache.org/docs/0.9.0/python-programming-guide.html) applications on YARN. # Optional. Job is a PySpark job.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001054 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
1055 &quot;A String&quot;,
1056 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001057 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
1058 &quot;A String&quot;,
1059 ],
1060 &quot;fileUris&quot;: [ # Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks.
1061 &quot;A String&quot;,
1062 ],
1063 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks.
1064 &quot;A String&quot;,
1065 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001066 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1067 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1068 &quot;a_key&quot;: &quot;A String&quot;,
1069 },
1070 },
1071 &quot;mainPythonFileUri&quot;: &quot;A String&quot;, # Required. The HCFS URI of the main Python file to use as the driver. Must be a .py file.
1072 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.
1073 &quot;a_key&quot;: &quot;A String&quot;,
1074 },
1075 &quot;pythonFileUris&quot;: [ # Optional. HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip.
1076 &quot;A String&quot;,
1077 ],
1078 },
1079 &quot;reference&quot;: { # Encapsulates the full scoping used to reference a job. # Optional. The fully qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not specified when a job is created, the server generates a job_id.
1080 &quot;jobId&quot;: &quot;A String&quot;, # Optional. The job ID, which must be unique within the project.The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 100 characters.If not specified by the caller, the job ID will be provided by the server.
1081 &quot;projectId&quot;: &quot;A String&quot;, # Optional. The ID of the Google Cloud Platform project that the job belongs to. If specified, must match the request project ID.
1082 },
1083 &quot;scheduling&quot;: { # Job scheduling options. # Optional. Job scheduling configuration.
1084 &quot;maxFailuresPerHour&quot;: 42, # Optional. Maximum number of times per hour a driver may be restarted as a result of driver exiting with non-zero code before job is reported failed.A job may be reported as thrashing if driver exits with non-zero code 4 times within 10 minute window.Maximum value is 10.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001085 &quot;maxFailuresTotal&quot;: 42, # Optional. Maximum number of times in total a driver may be restarted as a result of driver exiting with non-zero code before job is reported failed. Maximum value is 240.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001086 },
1087 &quot;sparkJob&quot;: { # A Dataproc job for running Apache Spark (http://spark.apache.org/) applications on YARN. # Optional. Job is a Spark job.
1088 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
1089 &quot;A String&quot;,
1090 ],
1091 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
1092 &quot;A String&quot;,
1093 ],
1094 &quot;fileUris&quot;: [ # Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks.
1095 &quot;A String&quot;,
1096 ],
1097 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks.
1098 &quot;A String&quot;,
1099 ],
1100 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1101 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1102 &quot;a_key&quot;: &quot;A String&quot;,
1103 },
1104 },
1105 &quot;mainClass&quot;: &quot;A String&quot;, # The name of the driver&#x27;s main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris.
1106 &quot;mainJarFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the jar file that contains the main class.
1107 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.
1108 &quot;a_key&quot;: &quot;A String&quot;,
1109 },
1110 },
1111 &quot;sparkRJob&quot;: { # A Dataproc job for running Apache SparkR (https://spark.apache.org/docs/latest/sparkr.html) applications on YARN. # Optional. Job is a SparkR job.
1112 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
1113 &quot;A String&quot;,
1114 ],
1115 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
1116 &quot;A String&quot;,
1117 ],
1118 &quot;fileUris&quot;: [ # Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks.
1119 &quot;A String&quot;,
1120 ],
1121 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1122 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1123 &quot;a_key&quot;: &quot;A String&quot;,
1124 },
1125 },
1126 &quot;mainRFileUri&quot;: &quot;A String&quot;, # Required. The HCFS URI of the main R file to use as the driver. Must be a .R file.
1127 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure SparkR. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.
1128 &quot;a_key&quot;: &quot;A String&quot;,
1129 },
1130 },
1131 &quot;sparkSqlJob&quot;: { # A Dataproc job for running Apache Spark SQL (http://spark.apache.org/sql/) queries. # Optional. Job is a SparkSql job.
1132 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
1133 &quot;A String&quot;,
1134 ],
1135 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1136 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1137 &quot;a_key&quot;: &quot;A String&quot;,
1138 },
1139 },
1140 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Spark SQL&#x27;s SparkConf. Properties that conflict with values set by the Dataproc API may be overwritten.
1141 &quot;a_key&quot;: &quot;A String&quot;,
1142 },
1143 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains SQL queries.
1144 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
1145 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
1146 &quot;A String&quot;,
1147 ],
1148 },
1149 &quot;scriptVariables&quot;: { # Optional. Mapping of query variable names to values (equivalent to the Spark SQL command: SET name=&quot;value&quot;;).
1150 &quot;a_key&quot;: &quot;A String&quot;,
1151 },
1152 },
1153 &quot;status&quot;: { # Dataproc job status. # Output only. The job status. Additional application-specific status information may be contained in the type_job and yarn_applications fields.
1154 &quot;details&quot;: &quot;A String&quot;, # Optional. Output only. Job state details, such as an error description if the state is ERROR.
1155 &quot;state&quot;: &quot;A String&quot;, # Output only. A state message specifying the overall job state.
1156 &quot;stateStartTime&quot;: &quot;A String&quot;, # Output only. The time when this state was entered.
1157 &quot;substate&quot;: &quot;A String&quot;, # Output only. Additional state information, which includes status reported by the agent.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001158 },
1159 &quot;statusHistory&quot;: [ # Output only. The previous job status.
1160 { # Dataproc job status.
1161 &quot;details&quot;: &quot;A String&quot;, # Optional. Output only. Job state details, such as an error description if the state is ERROR.
1162 &quot;state&quot;: &quot;A String&quot;, # Output only. A state message specifying the overall job state.
1163 &quot;stateStartTime&quot;: &quot;A String&quot;, # Output only. The time when this state was entered.
1164 &quot;substate&quot;: &quot;A String&quot;, # Output only. Additional state information, which includes status reported by the agent.
1165 },
1166 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001167 &quot;yarnApplications&quot;: [ # Output only. The collection of YARN applications spun up by this job.Beta Feature: This report is available for testing purposes only. It may be changed before final release.
1168 { # A YARN application created by a job. Application information is a subset of org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto.Beta Feature: This report is available for testing purposes only. It may be changed before final release.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001169 &quot;name&quot;: &quot;A String&quot;, # Required. The application name.
1170 &quot;progress&quot;: 3.14, # Required. The numerical progress of the application, from 1 to 100.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001171 &quot;state&quot;: &quot;A String&quot;, # Required. The application state.
1172 &quot;trackingUrl&quot;: &quot;A String&quot;, # Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001173 },
1174 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001175}
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001176
1177 updateMask: string, Required. Specifies the path, relative to Job, of the field to update. For example, to update the labels of a Job the update_mask parameter would be specified as labels, and the PATCH request body would specify the new value. *Note:* Currently, labels is the only field that can be updated.
1178 x__xgafv: string, V1 error format.
1179 Allowed values
1180 1 - v1 error format
1181 2 - v2 error format
1182
1183Returns:
1184 An object of the form:
1185
1186 { # A Dataproc job resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001187 &quot;done&quot;: True or False, # Output only. Indicates whether the job is completed. If the value is false, the job is still in progress. If true, the job is completed, and status.state field will indicate if it was successful, failed, or cancelled.
1188 &quot;driverControlFilesUri&quot;: &quot;A String&quot;, # Output only. If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as driver_output_uri.
1189 &quot;driverOutputResourceUri&quot;: &quot;A String&quot;, # Output only. A URI pointing to the location of the stdout of the job&#x27;s driver program.
1190 &quot;hadoopJob&quot;: { # A Dataproc job for running Apache Hadoop MapReduce (https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) jobs on Apache Hadoop YARN (https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). # Optional. Job is a Hadoop job.
1191 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip.
1192 &quot;A String&quot;,
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001193 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001194 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
1195 &quot;A String&quot;,
1196 ],
1197 &quot;fileUris&quot;: [ # Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks.
1198 &quot;A String&quot;,
1199 ],
1200 &quot;jarFileUris&quot;: [ # Optional. Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks.
1201 &quot;A String&quot;,
1202 ],
1203 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1204 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1205 &quot;a_key&quot;: &quot;A String&quot;,
1206 },
1207 },
1208 &quot;mainClass&quot;: &quot;A String&quot;, # The name of the driver&#x27;s main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris.
1209 &quot;mainJarFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the jar file containing the main class. Examples: &#x27;gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar&#x27; &#x27;hdfs:/tmp/test-samples/custom-wordcount.jar&#x27; &#x27;file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar&#x27;
1210 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001211 &quot;a_key&quot;: &quot;A String&quot;,
1212 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001213 },
1214 &quot;hiveJob&quot;: { # A Dataproc job for running Apache Hive (https://hive.apache.org/) queries on YARN. # Optional. Job is a Hive job.
1215 &quot;continueOnFailure&quot;: True or False, # Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
1216 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.
1217 &quot;A String&quot;,
1218 ],
1219 &quot;properties&quot;: { # Optional. A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.
1220 &quot;a_key&quot;: &quot;A String&quot;,
1221 },
1222 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains Hive queries.
1223 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
1224 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
1225 &quot;A String&quot;,
1226 ],
1227 },
1228 &quot;scriptVariables&quot;: { # Optional. Mapping of query variable names to values (equivalent to the Hive command: SET name=&quot;value&quot;;).
1229 &quot;a_key&quot;: &quot;A String&quot;,
1230 },
1231 },
1232 &quot;jobUuid&quot;: &quot;A String&quot;, # Output only. A UUID that uniquely identifies a job within the project over time. This is in contrast to a user-settable reference.job_id that may be reused over time.
1233 &quot;labels&quot;: { # Optional. The labels to associate with this job. 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 job.
1234 &quot;a_key&quot;: &quot;A String&quot;,
1235 },
1236 &quot;pigJob&quot;: { # A Dataproc job for running Apache Pig (https://pig.apache.org/) queries on YARN. # Optional. Job is a Pig job.
1237 &quot;continueOnFailure&quot;: True or False, # Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
1238 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
1239 &quot;A String&quot;,
1240 ],
1241 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1242 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1243 &quot;a_key&quot;: &quot;A String&quot;,
1244 },
1245 },
1246 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.
1247 &quot;a_key&quot;: &quot;A String&quot;,
1248 },
1249 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains the Pig queries.
1250 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
1251 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
1252 &quot;A String&quot;,
1253 ],
1254 },
1255 &quot;scriptVariables&quot;: { # Optional. Mapping of query variable names to values (equivalent to the Pig command: name=[value]).
1256 &quot;a_key&quot;: &quot;A String&quot;,
1257 },
1258 },
1259 &quot;placement&quot;: { # Dataproc job config. # Required. Job information, including how, when, and where to run the job.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001260 &quot;clusterLabels&quot;: { # Optional. Cluster labels to identify a cluster where the job will be submitted.
1261 &quot;a_key&quot;: &quot;A String&quot;,
1262 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001263 &quot;clusterName&quot;: &quot;A String&quot;, # Required. The name of the cluster where the job will be submitted.
1264 &quot;clusterUuid&quot;: &quot;A String&quot;, # Output only. A cluster UUID generated by the Dataproc service when the job is submitted.
1265 },
1266 &quot;prestoJob&quot;: { # A Dataproc job for running Presto (https://prestosql.io/) queries. IMPORTANT: The Dataproc Presto Optional Component (https://cloud.google.com/dataproc/docs/concepts/components/presto) must be enabled when the cluster is created to submit a Presto job to the cluster. # Optional. Job is a Presto job.
1267 &quot;clientTags&quot;: [ # Optional. Presto client tags to attach to this query
1268 &quot;A String&quot;,
1269 ],
1270 &quot;continueOnFailure&quot;: True or False, # Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
1271 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1272 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1273 &quot;a_key&quot;: &quot;A String&quot;,
1274 },
1275 },
1276 &quot;outputFormat&quot;: &quot;A String&quot;, # Optional. The format in which query output will be displayed. See the Presto documentation for supported output formats
1277 &quot;properties&quot;: { # Optional. A mapping of property names to values. Used to set Presto session properties (https://prestodb.io/docs/current/sql/set-session.html) Equivalent to using the --session flag in the Presto CLI
1278 &quot;a_key&quot;: &quot;A String&quot;,
1279 },
1280 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains SQL queries.
1281 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
1282 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
1283 &quot;A String&quot;,
1284 ],
1285 },
1286 },
1287 &quot;pysparkJob&quot;: { # A Dataproc job for running Apache PySpark (https://spark.apache.org/docs/0.9.0/python-programming-guide.html) applications on YARN. # Optional. Job is a PySpark job.
1288 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
1289 &quot;A String&quot;,
1290 ],
1291 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
1292 &quot;A String&quot;,
1293 ],
1294 &quot;fileUris&quot;: [ # Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks.
1295 &quot;A String&quot;,
1296 ],
1297 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks.
1298 &quot;A String&quot;,
1299 ],
1300 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1301 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1302 &quot;a_key&quot;: &quot;A String&quot;,
1303 },
1304 },
1305 &quot;mainPythonFileUri&quot;: &quot;A String&quot;, # Required. The HCFS URI of the main Python file to use as the driver. Must be a .py file.
1306 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.
1307 &quot;a_key&quot;: &quot;A String&quot;,
1308 },
1309 &quot;pythonFileUris&quot;: [ # Optional. HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip.
1310 &quot;A String&quot;,
1311 ],
1312 },
1313 &quot;reference&quot;: { # Encapsulates the full scoping used to reference a job. # Optional. The fully qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not specified when a job is created, the server generates a job_id.
1314 &quot;jobId&quot;: &quot;A String&quot;, # Optional. The job ID, which must be unique within the project.The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 100 characters.If not specified by the caller, the job ID will be provided by the server.
1315 &quot;projectId&quot;: &quot;A String&quot;, # Optional. The ID of the Google Cloud Platform project that the job belongs to. If specified, must match the request project ID.
1316 },
1317 &quot;scheduling&quot;: { # Job scheduling options. # Optional. Job scheduling configuration.
1318 &quot;maxFailuresPerHour&quot;: 42, # Optional. Maximum number of times per hour a driver may be restarted as a result of driver exiting with non-zero code before job is reported failed.A job may be reported as thrashing if driver exits with non-zero code 4 times within 10 minute window.Maximum value is 10.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001319 &quot;maxFailuresTotal&quot;: 42, # Optional. Maximum number of times in total a driver may be restarted as a result of driver exiting with non-zero code before job is reported failed. Maximum value is 240.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001320 },
1321 &quot;sparkJob&quot;: { # A Dataproc job for running Apache Spark (http://spark.apache.org/) applications on YARN. # Optional. Job is a Spark job.
1322 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
1323 &quot;A String&quot;,
1324 ],
1325 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
1326 &quot;A String&quot;,
1327 ],
1328 &quot;fileUris&quot;: [ # Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks.
1329 &quot;A String&quot;,
1330 ],
1331 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks.
1332 &quot;A String&quot;,
1333 ],
1334 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1335 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1336 &quot;a_key&quot;: &quot;A String&quot;,
1337 },
1338 },
1339 &quot;mainClass&quot;: &quot;A String&quot;, # The name of the driver&#x27;s main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris.
1340 &quot;mainJarFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the jar file that contains the main class.
1341 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.
1342 &quot;a_key&quot;: &quot;A String&quot;,
1343 },
1344 },
1345 &quot;sparkRJob&quot;: { # A Dataproc job for running Apache SparkR (https://spark.apache.org/docs/latest/sparkr.html) applications on YARN. # Optional. Job is a SparkR job.
1346 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
1347 &quot;A String&quot;,
1348 ],
1349 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
1350 &quot;A String&quot;,
1351 ],
1352 &quot;fileUris&quot;: [ # Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks.
1353 &quot;A String&quot;,
1354 ],
1355 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1356 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1357 &quot;a_key&quot;: &quot;A String&quot;,
1358 },
1359 },
1360 &quot;mainRFileUri&quot;: &quot;A String&quot;, # Required. The HCFS URI of the main R file to use as the driver. Must be a .R file.
1361 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure SparkR. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.
1362 &quot;a_key&quot;: &quot;A String&quot;,
1363 },
1364 },
1365 &quot;sparkSqlJob&quot;: { # A Dataproc job for running Apache Spark SQL (http://spark.apache.org/sql/) queries. # Optional. Job is a SparkSql job.
1366 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
1367 &quot;A String&quot;,
1368 ],
1369 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1370 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1371 &quot;a_key&quot;: &quot;A String&quot;,
1372 },
1373 },
1374 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Spark SQL&#x27;s SparkConf. Properties that conflict with values set by the Dataproc API may be overwritten.
1375 &quot;a_key&quot;: &quot;A String&quot;,
1376 },
1377 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains SQL queries.
1378 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
1379 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
1380 &quot;A String&quot;,
1381 ],
1382 },
1383 &quot;scriptVariables&quot;: { # Optional. Mapping of query variable names to values (equivalent to the Spark SQL command: SET name=&quot;value&quot;;).
1384 &quot;a_key&quot;: &quot;A String&quot;,
1385 },
1386 },
1387 &quot;status&quot;: { # Dataproc job status. # Output only. The job status. Additional application-specific status information may be contained in the type_job and yarn_applications fields.
1388 &quot;details&quot;: &quot;A String&quot;, # Optional. Output only. Job state details, such as an error description if the state is ERROR.
1389 &quot;state&quot;: &quot;A String&quot;, # Output only. A state message specifying the overall job state.
1390 &quot;stateStartTime&quot;: &quot;A String&quot;, # Output only. The time when this state was entered.
1391 &quot;substate&quot;: &quot;A String&quot;, # Output only. Additional state information, which includes status reported by the agent.
1392 },
1393 &quot;statusHistory&quot;: [ # Output only. The previous job status.
1394 { # Dataproc job status.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001395 &quot;details&quot;: &quot;A String&quot;, # Optional. Output only. Job state details, such as an error description if the state is ERROR.
1396 &quot;state&quot;: &quot;A String&quot;, # Output only. A state message specifying the overall job state.
1397 &quot;stateStartTime&quot;: &quot;A String&quot;, # Output only. The time when this state was entered.
1398 &quot;substate&quot;: &quot;A String&quot;, # Output only. Additional state information, which includes status reported by the agent.
1399 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001400 ],
1401 &quot;yarnApplications&quot;: [ # Output only. The collection of YARN applications spun up by this job.Beta Feature: This report is available for testing purposes only. It may be changed before final release.
1402 { # A YARN application created by a job. Application information is a subset of org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto.Beta Feature: This report is available for testing purposes only. It may be changed before final release.
1403 &quot;name&quot;: &quot;A String&quot;, # Required. The application name.
1404 &quot;progress&quot;: 3.14, # Required. The numerical progress of the application, from 1 to 100.
1405 &quot;state&quot;: &quot;A String&quot;, # Required. The application state.
1406 &quot;trackingUrl&quot;: &quot;A String&quot;, # Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001407 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001408 ],
1409}</pre>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001410</div>
1411
1412<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001413 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001414 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001415
1416Args:
1417 resource: string, REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001418 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001419 The object takes the form of:
1420
1421{ # Request message for SetIamPolicy method.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001422 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.A Policy is a collection of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role.For some types of Google Cloud resources, a binding can also specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).JSON example: { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } YAML example: bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the IAM documentation (https://cloud.google.com/iam/docs/). # REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.
1423 &quot;bindings&quot;: [ # Associates a list of members to a role. Optionally, may specify a condition that determines how and when the bindings are applied. Each of the bindings must contain at least one member.
1424 { # Associates members with a role.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001425 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec.Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding.If the condition evaluates to true, then this binding applies to the current request.If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).
1426 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1427 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1428 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1429 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001430 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001431 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. members can have the following values: allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account. allAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account. user:{emailid}: An email address that represents a specific Google account. For example, alice@example.com . serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com. group:{emailid}: An email address that represents a Google group. For example, admins@example.com. deleted:user:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a user that has been recently deleted. For example, alice@example.com?uid=123456789012345678901. If the user is recovered, this value reverts to user:{emailid} and the recovered user retains the role in the binding. deleted:serviceAccount:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901. If the service account is undeleted, this value reverts to serviceAccount:{emailid} and the undeleted service account retains the role in the binding. deleted:group:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, admins@example.com?uid=123456789012345678901. If the group is recovered, this value reverts to group:{emailid} and the recovered group retains the role in the binding. domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com.
1432 &quot;A String&quot;,
1433 ],
1434 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner.
1435 },
1436 ],
1437 &quot;etag&quot;: &quot;A String&quot;, # etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An etag is returned in the response to getIamPolicy, and systems are expected to put that etag in the request to setIamPolicy to ensure that their change will be applied to the same version of the policy.Important: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.
1438 &quot;version&quot;: 42, # Specifies the format of the policy.Valid values are 0, 1, and 3. Requests that specify an invalid value are rejected.Any operation that affects conditional role bindings must specify version 3. This requirement applies to the following operations: Getting a policy that includes a conditional role binding Adding a conditional role binding to a policy Changing a conditional role binding in a policy Removing any role binding, with or without a condition, from a policy that includes conditionsImportant: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).
1439 },
1440}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001441
1442 x__xgafv: string, V1 error format.
1443 Allowed values
1444 1 - v1 error format
1445 2 - v2 error format
1446
1447Returns:
1448 An object of the form:
1449
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001450 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.A Policy is a collection of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role.For some types of Google Cloud resources, a binding can also specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).JSON example: { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } YAML example: bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the IAM documentation (https://cloud.google.com/iam/docs/).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001451 &quot;bindings&quot;: [ # Associates a list of members to a role. Optionally, may specify a condition that determines how and when the bindings are applied. Each of the bindings must contain at least one member.
1452 { # Associates members with a role.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001453 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec.Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding.If the condition evaluates to true, then this binding applies to the current request.If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).
1454 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1455 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1456 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1457 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001458 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001459 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. members can have the following values: allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account. allAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account. user:{emailid}: An email address that represents a specific Google account. For example, alice@example.com . serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com. group:{emailid}: An email address that represents a Google group. For example, admins@example.com. deleted:user:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a user that has been recently deleted. For example, alice@example.com?uid=123456789012345678901. If the user is recovered, this value reverts to user:{emailid} and the recovered user retains the role in the binding. deleted:serviceAccount:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901. If the service account is undeleted, this value reverts to serviceAccount:{emailid} and the undeleted service account retains the role in the binding. deleted:group:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, admins@example.com?uid=123456789012345678901. If the group is recovered, this value reverts to group:{emailid} and the recovered group retains the role in the binding. domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com.
1460 &quot;A String&quot;,
1461 ],
1462 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner.
1463 },
1464 ],
1465 &quot;etag&quot;: &quot;A String&quot;, # etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An etag is returned in the response to getIamPolicy, and systems are expected to put that etag in the request to setIamPolicy to ensure that their change will be applied to the same version of the policy.Important: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.
1466 &quot;version&quot;: 42, # Specifies the format of the policy.Valid values are 0, 1, and 3. Requests that specify an invalid value are rejected.Any operation that affects conditional role bindings must specify version 3. This requirement applies to the following operations: Getting a policy that includes a conditional role binding Adding a conditional role binding to a policy Changing a conditional role binding in a policy Removing any role binding, with or without a condition, from a policy that includes conditionsImportant: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).
1467}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001468</div>
1469
1470<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001471 <code class="details" id="submit">submit(projectId, region, body=None, x__xgafv=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001472 <pre>Submits a job to a cluster.
1473
1474Args:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001475 projectId: string, Required. The ID of the Google Cloud Platform project that the job belongs to. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001476 region: string, Required. The Dataproc region in which to handle the request. (required)
1477 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001478 The object takes the form of:
1479
1480{ # A request to submit a job.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001481 &quot;job&quot;: { # A Dataproc job resource. # Required. The job resource.
1482 &quot;done&quot;: True or False, # Output only. Indicates whether the job is completed. If the value is false, the job is still in progress. If true, the job is completed, and status.state field will indicate if it was successful, failed, or cancelled.
1483 &quot;driverControlFilesUri&quot;: &quot;A String&quot;, # Output only. If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as driver_output_uri.
1484 &quot;driverOutputResourceUri&quot;: &quot;A String&quot;, # Output only. A URI pointing to the location of the stdout of the job&#x27;s driver program.
1485 &quot;hadoopJob&quot;: { # A Dataproc job for running Apache Hadoop MapReduce (https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) jobs on Apache Hadoop YARN (https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). # Optional. Job is a Hadoop job.
1486 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip.
1487 &quot;A String&quot;,
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001488 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001489 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
1490 &quot;A String&quot;,
1491 ],
1492 &quot;fileUris&quot;: [ # Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks.
1493 &quot;A String&quot;,
1494 ],
1495 &quot;jarFileUris&quot;: [ # Optional. Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks.
1496 &quot;A String&quot;,
1497 ],
1498 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1499 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1500 &quot;a_key&quot;: &quot;A String&quot;,
1501 },
1502 },
1503 &quot;mainClass&quot;: &quot;A String&quot;, # The name of the driver&#x27;s main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris.
1504 &quot;mainJarFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the jar file containing the main class. Examples: &#x27;gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar&#x27; &#x27;hdfs:/tmp/test-samples/custom-wordcount.jar&#x27; &#x27;file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar&#x27;
1505 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001506 &quot;a_key&quot;: &quot;A String&quot;,
1507 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001508 },
1509 &quot;hiveJob&quot;: { # A Dataproc job for running Apache Hive (https://hive.apache.org/) queries on YARN. # Optional. Job is a Hive job.
1510 &quot;continueOnFailure&quot;: True or False, # Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
1511 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.
1512 &quot;A String&quot;,
1513 ],
1514 &quot;properties&quot;: { # Optional. A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.
1515 &quot;a_key&quot;: &quot;A String&quot;,
1516 },
1517 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains Hive queries.
1518 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
1519 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
1520 &quot;A String&quot;,
1521 ],
1522 },
1523 &quot;scriptVariables&quot;: { # Optional. Mapping of query variable names to values (equivalent to the Hive command: SET name=&quot;value&quot;;).
1524 &quot;a_key&quot;: &quot;A String&quot;,
1525 },
1526 },
1527 &quot;jobUuid&quot;: &quot;A String&quot;, # Output only. A UUID that uniquely identifies a job within the project over time. This is in contrast to a user-settable reference.job_id that may be reused over time.
1528 &quot;labels&quot;: { # Optional. The labels to associate with this job. 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 job.
1529 &quot;a_key&quot;: &quot;A String&quot;,
1530 },
1531 &quot;pigJob&quot;: { # A Dataproc job for running Apache Pig (https://pig.apache.org/) queries on YARN. # Optional. Job is a Pig job.
1532 &quot;continueOnFailure&quot;: True or False, # Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
1533 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
1534 &quot;A String&quot;,
1535 ],
1536 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1537 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1538 &quot;a_key&quot;: &quot;A String&quot;,
1539 },
1540 },
1541 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.
1542 &quot;a_key&quot;: &quot;A String&quot;,
1543 },
1544 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains the Pig queries.
1545 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
1546 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
1547 &quot;A String&quot;,
1548 ],
1549 },
1550 &quot;scriptVariables&quot;: { # Optional. Mapping of query variable names to values (equivalent to the Pig command: name=[value]).
1551 &quot;a_key&quot;: &quot;A String&quot;,
1552 },
1553 },
1554 &quot;placement&quot;: { # Dataproc job config. # Required. Job information, including how, when, and where to run the job.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001555 &quot;clusterLabels&quot;: { # Optional. Cluster labels to identify a cluster where the job will be submitted.
1556 &quot;a_key&quot;: &quot;A String&quot;,
1557 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001558 &quot;clusterName&quot;: &quot;A String&quot;, # Required. The name of the cluster where the job will be submitted.
1559 &quot;clusterUuid&quot;: &quot;A String&quot;, # Output only. A cluster UUID generated by the Dataproc service when the job is submitted.
1560 },
1561 &quot;prestoJob&quot;: { # A Dataproc job for running Presto (https://prestosql.io/) queries. IMPORTANT: The Dataproc Presto Optional Component (https://cloud.google.com/dataproc/docs/concepts/components/presto) must be enabled when the cluster is created to submit a Presto job to the cluster. # Optional. Job is a Presto job.
1562 &quot;clientTags&quot;: [ # Optional. Presto client tags to attach to this query
1563 &quot;A String&quot;,
1564 ],
1565 &quot;continueOnFailure&quot;: True or False, # Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
1566 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1567 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1568 &quot;a_key&quot;: &quot;A String&quot;,
1569 },
1570 },
1571 &quot;outputFormat&quot;: &quot;A String&quot;, # Optional. The format in which query output will be displayed. See the Presto documentation for supported output formats
1572 &quot;properties&quot;: { # Optional. A mapping of property names to values. Used to set Presto session properties (https://prestodb.io/docs/current/sql/set-session.html) Equivalent to using the --session flag in the Presto CLI
1573 &quot;a_key&quot;: &quot;A String&quot;,
1574 },
1575 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains SQL queries.
1576 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
1577 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
1578 &quot;A String&quot;,
1579 ],
1580 },
1581 },
1582 &quot;pysparkJob&quot;: { # A Dataproc job for running Apache PySpark (https://spark.apache.org/docs/0.9.0/python-programming-guide.html) applications on YARN. # Optional. Job is a PySpark job.
1583 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
1584 &quot;A String&quot;,
1585 ],
1586 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
1587 &quot;A String&quot;,
1588 ],
1589 &quot;fileUris&quot;: [ # Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks.
1590 &quot;A String&quot;,
1591 ],
1592 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks.
1593 &quot;A String&quot;,
1594 ],
1595 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1596 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1597 &quot;a_key&quot;: &quot;A String&quot;,
1598 },
1599 },
1600 &quot;mainPythonFileUri&quot;: &quot;A String&quot;, # Required. The HCFS URI of the main Python file to use as the driver. Must be a .py file.
1601 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.
1602 &quot;a_key&quot;: &quot;A String&quot;,
1603 },
1604 &quot;pythonFileUris&quot;: [ # Optional. HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip.
1605 &quot;A String&quot;,
1606 ],
1607 },
1608 &quot;reference&quot;: { # Encapsulates the full scoping used to reference a job. # Optional. The fully qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not specified when a job is created, the server generates a job_id.
1609 &quot;jobId&quot;: &quot;A String&quot;, # Optional. The job ID, which must be unique within the project.The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 100 characters.If not specified by the caller, the job ID will be provided by the server.
1610 &quot;projectId&quot;: &quot;A String&quot;, # Optional. The ID of the Google Cloud Platform project that the job belongs to. If specified, must match the request project ID.
1611 },
1612 &quot;scheduling&quot;: { # Job scheduling options. # Optional. Job scheduling configuration.
1613 &quot;maxFailuresPerHour&quot;: 42, # Optional. Maximum number of times per hour a driver may be restarted as a result of driver exiting with non-zero code before job is reported failed.A job may be reported as thrashing if driver exits with non-zero code 4 times within 10 minute window.Maximum value is 10.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001614 &quot;maxFailuresTotal&quot;: 42, # Optional. Maximum number of times in total a driver may be restarted as a result of driver exiting with non-zero code before job is reported failed. Maximum value is 240.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001615 },
1616 &quot;sparkJob&quot;: { # A Dataproc job for running Apache Spark (http://spark.apache.org/) applications on YARN. # Optional. Job is a Spark job.
1617 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
1618 &quot;A String&quot;,
1619 ],
1620 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
1621 &quot;A String&quot;,
1622 ],
1623 &quot;fileUris&quot;: [ # Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks.
1624 &quot;A String&quot;,
1625 ],
1626 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks.
1627 &quot;A String&quot;,
1628 ],
1629 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1630 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1631 &quot;a_key&quot;: &quot;A String&quot;,
1632 },
1633 },
1634 &quot;mainClass&quot;: &quot;A String&quot;, # The name of the driver&#x27;s main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris.
1635 &quot;mainJarFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the jar file that contains the main class.
1636 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.
1637 &quot;a_key&quot;: &quot;A String&quot;,
1638 },
1639 },
1640 &quot;sparkRJob&quot;: { # A Dataproc job for running Apache SparkR (https://spark.apache.org/docs/latest/sparkr.html) applications on YARN. # Optional. Job is a SparkR job.
1641 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
1642 &quot;A String&quot;,
1643 ],
1644 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
1645 &quot;A String&quot;,
1646 ],
1647 &quot;fileUris&quot;: [ # Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks.
1648 &quot;A String&quot;,
1649 ],
1650 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1651 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1652 &quot;a_key&quot;: &quot;A String&quot;,
1653 },
1654 },
1655 &quot;mainRFileUri&quot;: &quot;A String&quot;, # Required. The HCFS URI of the main R file to use as the driver. Must be a .R file.
1656 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure SparkR. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.
1657 &quot;a_key&quot;: &quot;A String&quot;,
1658 },
1659 },
1660 &quot;sparkSqlJob&quot;: { # A Dataproc job for running Apache Spark SQL (http://spark.apache.org/sql/) queries. # Optional. Job is a SparkSql job.
1661 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
1662 &quot;A String&quot;,
1663 ],
1664 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1665 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1666 &quot;a_key&quot;: &quot;A String&quot;,
1667 },
1668 },
1669 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Spark SQL&#x27;s SparkConf. Properties that conflict with values set by the Dataproc API may be overwritten.
1670 &quot;a_key&quot;: &quot;A String&quot;,
1671 },
1672 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains SQL queries.
1673 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
1674 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
1675 &quot;A String&quot;,
1676 ],
1677 },
1678 &quot;scriptVariables&quot;: { # Optional. Mapping of query variable names to values (equivalent to the Spark SQL command: SET name=&quot;value&quot;;).
1679 &quot;a_key&quot;: &quot;A String&quot;,
1680 },
1681 },
1682 &quot;status&quot;: { # Dataproc job status. # Output only. The job status. Additional application-specific status information may be contained in the type_job and yarn_applications fields.
1683 &quot;details&quot;: &quot;A String&quot;, # Optional. Output only. Job state details, such as an error description if the state is ERROR.
1684 &quot;state&quot;: &quot;A String&quot;, # Output only. A state message specifying the overall job state.
1685 &quot;stateStartTime&quot;: &quot;A String&quot;, # Output only. The time when this state was entered.
1686 &quot;substate&quot;: &quot;A String&quot;, # Output only. Additional state information, which includes status reported by the agent.
1687 },
1688 &quot;statusHistory&quot;: [ # Output only. The previous job status.
1689 { # Dataproc job status.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001690 &quot;details&quot;: &quot;A String&quot;, # Optional. Output only. Job state details, such as an error description if the state is ERROR.
1691 &quot;state&quot;: &quot;A String&quot;, # Output only. A state message specifying the overall job state.
1692 &quot;stateStartTime&quot;: &quot;A String&quot;, # Output only. The time when this state was entered.
1693 &quot;substate&quot;: &quot;A String&quot;, # Output only. Additional state information, which includes status reported by the agent.
1694 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001695 ],
1696 &quot;yarnApplications&quot;: [ # Output only. The collection of YARN applications spun up by this job.Beta Feature: This report is available for testing purposes only. It may be changed before final release.
1697 { # A YARN application created by a job. Application information is a subset of org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto.Beta Feature: This report is available for testing purposes only. It may be changed before final release.
1698 &quot;name&quot;: &quot;A String&quot;, # Required. The application name.
1699 &quot;progress&quot;: 3.14, # Required. The numerical progress of the application, from 1 to 100.
1700 &quot;state&quot;: &quot;A String&quot;, # Required. The application state.
1701 &quot;trackingUrl&quot;: &quot;A String&quot;, # Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001702 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001703 ],
1704 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001705 &quot;requestId&quot;: &quot;A String&quot;, # Optional. A unique id used to identify the request. If the server receives two SubmitJobRequest (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.SubmitJobRequest)s with the same id, then the second request will be ignored and the first Job created and stored in the backend is returned.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001706}
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001707
1708 x__xgafv: string, V1 error format.
1709 Allowed values
1710 1 - v1 error format
1711 2 - v2 error format
1712
1713Returns:
1714 An object of the form:
1715
1716 { # A Dataproc job resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001717 &quot;done&quot;: True or False, # Output only. Indicates whether the job is completed. If the value is false, the job is still in progress. If true, the job is completed, and status.state field will indicate if it was successful, failed, or cancelled.
1718 &quot;driverControlFilesUri&quot;: &quot;A String&quot;, # Output only. If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as driver_output_uri.
1719 &quot;driverOutputResourceUri&quot;: &quot;A String&quot;, # Output only. A URI pointing to the location of the stdout of the job&#x27;s driver program.
1720 &quot;hadoopJob&quot;: { # A Dataproc job for running Apache Hadoop MapReduce (https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) jobs on Apache Hadoop YARN (https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). # Optional. Job is a Hadoop job.
1721 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip.
1722 &quot;A String&quot;,
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001723 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001724 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
1725 &quot;A String&quot;,
1726 ],
1727 &quot;fileUris&quot;: [ # Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks.
1728 &quot;A String&quot;,
1729 ],
1730 &quot;jarFileUris&quot;: [ # Optional. Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks.
1731 &quot;A String&quot;,
1732 ],
1733 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1734 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1735 &quot;a_key&quot;: &quot;A String&quot;,
1736 },
1737 },
1738 &quot;mainClass&quot;: &quot;A String&quot;, # The name of the driver&#x27;s main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris.
1739 &quot;mainJarFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the jar file containing the main class. Examples: &#x27;gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar&#x27; &#x27;hdfs:/tmp/test-samples/custom-wordcount.jar&#x27; &#x27;file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar&#x27;
1740 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001741 &quot;a_key&quot;: &quot;A String&quot;,
1742 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001743 },
1744 &quot;hiveJob&quot;: { # A Dataproc job for running Apache Hive (https://hive.apache.org/) queries on YARN. # Optional. Job is a Hive job.
1745 &quot;continueOnFailure&quot;: True or False, # Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
1746 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.
1747 &quot;A String&quot;,
1748 ],
1749 &quot;properties&quot;: { # Optional. A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.
1750 &quot;a_key&quot;: &quot;A String&quot;,
1751 },
1752 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains Hive queries.
1753 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
1754 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
1755 &quot;A String&quot;,
1756 ],
1757 },
1758 &quot;scriptVariables&quot;: { # Optional. Mapping of query variable names to values (equivalent to the Hive command: SET name=&quot;value&quot;;).
1759 &quot;a_key&quot;: &quot;A String&quot;,
1760 },
1761 },
1762 &quot;jobUuid&quot;: &quot;A String&quot;, # Output only. A UUID that uniquely identifies a job within the project over time. This is in contrast to a user-settable reference.job_id that may be reused over time.
1763 &quot;labels&quot;: { # Optional. The labels to associate with this job. 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 job.
1764 &quot;a_key&quot;: &quot;A String&quot;,
1765 },
1766 &quot;pigJob&quot;: { # A Dataproc job for running Apache Pig (https://pig.apache.org/) queries on YARN. # Optional. Job is a Pig job.
1767 &quot;continueOnFailure&quot;: True or False, # Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
1768 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
1769 &quot;A String&quot;,
1770 ],
1771 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1772 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1773 &quot;a_key&quot;: &quot;A String&quot;,
1774 },
1775 },
1776 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.
1777 &quot;a_key&quot;: &quot;A String&quot;,
1778 },
1779 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains the Pig queries.
1780 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
1781 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
1782 &quot;A String&quot;,
1783 ],
1784 },
1785 &quot;scriptVariables&quot;: { # Optional. Mapping of query variable names to values (equivalent to the Pig command: name=[value]).
1786 &quot;a_key&quot;: &quot;A String&quot;,
1787 },
1788 },
1789 &quot;placement&quot;: { # Dataproc job config. # Required. Job information, including how, when, and where to run the job.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001790 &quot;clusterLabels&quot;: { # Optional. Cluster labels to identify a cluster where the job will be submitted.
1791 &quot;a_key&quot;: &quot;A String&quot;,
1792 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001793 &quot;clusterName&quot;: &quot;A String&quot;, # Required. The name of the cluster where the job will be submitted.
1794 &quot;clusterUuid&quot;: &quot;A String&quot;, # Output only. A cluster UUID generated by the Dataproc service when the job is submitted.
1795 },
1796 &quot;prestoJob&quot;: { # A Dataproc job for running Presto (https://prestosql.io/) queries. IMPORTANT: The Dataproc Presto Optional Component (https://cloud.google.com/dataproc/docs/concepts/components/presto) must be enabled when the cluster is created to submit a Presto job to the cluster. # Optional. Job is a Presto job.
1797 &quot;clientTags&quot;: [ # Optional. Presto client tags to attach to this query
1798 &quot;A String&quot;,
1799 ],
1800 &quot;continueOnFailure&quot;: True or False, # Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
1801 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1802 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1803 &quot;a_key&quot;: &quot;A String&quot;,
1804 },
1805 },
1806 &quot;outputFormat&quot;: &quot;A String&quot;, # Optional. The format in which query output will be displayed. See the Presto documentation for supported output formats
1807 &quot;properties&quot;: { # Optional. A mapping of property names to values. Used to set Presto session properties (https://prestodb.io/docs/current/sql/set-session.html) Equivalent to using the --session flag in the Presto CLI
1808 &quot;a_key&quot;: &quot;A String&quot;,
1809 },
1810 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains SQL queries.
1811 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
1812 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
1813 &quot;A String&quot;,
1814 ],
1815 },
1816 },
1817 &quot;pysparkJob&quot;: { # A Dataproc job for running Apache PySpark (https://spark.apache.org/docs/0.9.0/python-programming-guide.html) applications on YARN. # Optional. Job is a PySpark job.
1818 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
1819 &quot;A String&quot;,
1820 ],
1821 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
1822 &quot;A String&quot;,
1823 ],
1824 &quot;fileUris&quot;: [ # Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks.
1825 &quot;A String&quot;,
1826 ],
1827 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks.
1828 &quot;A String&quot;,
1829 ],
1830 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1831 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1832 &quot;a_key&quot;: &quot;A String&quot;,
1833 },
1834 },
1835 &quot;mainPythonFileUri&quot;: &quot;A String&quot;, # Required. The HCFS URI of the main Python file to use as the driver. Must be a .py file.
1836 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.
1837 &quot;a_key&quot;: &quot;A String&quot;,
1838 },
1839 &quot;pythonFileUris&quot;: [ # Optional. HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip.
1840 &quot;A String&quot;,
1841 ],
1842 },
1843 &quot;reference&quot;: { # Encapsulates the full scoping used to reference a job. # Optional. The fully qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not specified when a job is created, the server generates a job_id.
1844 &quot;jobId&quot;: &quot;A String&quot;, # Optional. The job ID, which must be unique within the project.The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 100 characters.If not specified by the caller, the job ID will be provided by the server.
1845 &quot;projectId&quot;: &quot;A String&quot;, # Optional. The ID of the Google Cloud Platform project that the job belongs to. If specified, must match the request project ID.
1846 },
1847 &quot;scheduling&quot;: { # Job scheduling options. # Optional. Job scheduling configuration.
1848 &quot;maxFailuresPerHour&quot;: 42, # Optional. Maximum number of times per hour a driver may be restarted as a result of driver exiting with non-zero code before job is reported failed.A job may be reported as thrashing if driver exits with non-zero code 4 times within 10 minute window.Maximum value is 10.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001849 &quot;maxFailuresTotal&quot;: 42, # Optional. Maximum number of times in total a driver may be restarted as a result of driver exiting with non-zero code before job is reported failed. Maximum value is 240.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001850 },
1851 &quot;sparkJob&quot;: { # A Dataproc job for running Apache Spark (http://spark.apache.org/) applications on YARN. # Optional. Job is a Spark job.
1852 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
1853 &quot;A String&quot;,
1854 ],
1855 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
1856 &quot;A String&quot;,
1857 ],
1858 &quot;fileUris&quot;: [ # Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks.
1859 &quot;A String&quot;,
1860 ],
1861 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks.
1862 &quot;A String&quot;,
1863 ],
1864 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1865 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1866 &quot;a_key&quot;: &quot;A String&quot;,
1867 },
1868 },
1869 &quot;mainClass&quot;: &quot;A String&quot;, # The name of the driver&#x27;s main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris.
1870 &quot;mainJarFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the jar file that contains the main class.
1871 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.
1872 &quot;a_key&quot;: &quot;A String&quot;,
1873 },
1874 },
1875 &quot;sparkRJob&quot;: { # A Dataproc job for running Apache SparkR (https://spark.apache.org/docs/latest/sparkr.html) applications on YARN. # Optional. Job is a SparkR job.
1876 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
1877 &quot;A String&quot;,
1878 ],
1879 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
1880 &quot;A String&quot;,
1881 ],
1882 &quot;fileUris&quot;: [ # Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks.
1883 &quot;A String&quot;,
1884 ],
1885 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1886 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1887 &quot;a_key&quot;: &quot;A String&quot;,
1888 },
1889 },
1890 &quot;mainRFileUri&quot;: &quot;A String&quot;, # Required. The HCFS URI of the main R file to use as the driver. Must be a .R file.
1891 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure SparkR. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.
1892 &quot;a_key&quot;: &quot;A String&quot;,
1893 },
1894 },
1895 &quot;sparkSqlJob&quot;: { # A Dataproc job for running Apache Spark SQL (http://spark.apache.org/sql/) queries. # Optional. Job is a SparkSql job.
1896 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
1897 &quot;A String&quot;,
1898 ],
1899 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1900 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1901 &quot;a_key&quot;: &quot;A String&quot;,
1902 },
1903 },
1904 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Spark SQL&#x27;s SparkConf. Properties that conflict with values set by the Dataproc API may be overwritten.
1905 &quot;a_key&quot;: &quot;A String&quot;,
1906 },
1907 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains SQL queries.
1908 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
1909 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
1910 &quot;A String&quot;,
1911 ],
1912 },
1913 &quot;scriptVariables&quot;: { # Optional. Mapping of query variable names to values (equivalent to the Spark SQL command: SET name=&quot;value&quot;;).
1914 &quot;a_key&quot;: &quot;A String&quot;,
1915 },
1916 },
1917 &quot;status&quot;: { # Dataproc job status. # Output only. The job status. Additional application-specific status information may be contained in the type_job and yarn_applications fields.
1918 &quot;details&quot;: &quot;A String&quot;, # Optional. Output only. Job state details, such as an error description if the state is ERROR.
1919 &quot;state&quot;: &quot;A String&quot;, # Output only. A state message specifying the overall job state.
1920 &quot;stateStartTime&quot;: &quot;A String&quot;, # Output only. The time when this state was entered.
1921 &quot;substate&quot;: &quot;A String&quot;, # Output only. Additional state information, which includes status reported by the agent.
1922 },
1923 &quot;statusHistory&quot;: [ # Output only. The previous job status.
1924 { # Dataproc job status.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001925 &quot;details&quot;: &quot;A String&quot;, # Optional. Output only. Job state details, such as an error description if the state is ERROR.
1926 &quot;state&quot;: &quot;A String&quot;, # Output only. A state message specifying the overall job state.
1927 &quot;stateStartTime&quot;: &quot;A String&quot;, # Output only. The time when this state was entered.
1928 &quot;substate&quot;: &quot;A String&quot;, # Output only. Additional state information, which includes status reported by the agent.
1929 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001930 ],
1931 &quot;yarnApplications&quot;: [ # Output only. The collection of YARN applications spun up by this job.Beta Feature: This report is available for testing purposes only. It may be changed before final release.
1932 { # A YARN application created by a job. Application information is a subset of org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto.Beta Feature: This report is available for testing purposes only. It may be changed before final release.
1933 &quot;name&quot;: &quot;A String&quot;, # Required. The application name.
1934 &quot;progress&quot;: 3.14, # Required. The numerical progress of the application, from 1 to 100.
1935 &quot;state&quot;: &quot;A String&quot;, # Required. The application state.
1936 &quot;trackingUrl&quot;: &quot;A String&quot;, # Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001937 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001938 ],
1939}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001940</div>
1941
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001942<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001943 <code class="details" id="submitAsOperation">submitAsOperation(projectId, region, body=None, x__xgafv=None)</code>
1944 <pre>Submits job to a cluster.
1945
1946Args:
1947 projectId: string, Required. The ID of the Google Cloud Platform project that the job belongs to. (required)
1948 region: string, Required. The Dataproc region in which to handle the request. (required)
1949 body: object, The request body.
1950 The object takes the form of:
1951
1952{ # A request to submit a job.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001953 &quot;job&quot;: { # A Dataproc job resource. # Required. The job resource.
1954 &quot;done&quot;: True or False, # Output only. Indicates whether the job is completed. If the value is false, the job is still in progress. If true, the job is completed, and status.state field will indicate if it was successful, failed, or cancelled.
1955 &quot;driverControlFilesUri&quot;: &quot;A String&quot;, # Output only. If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as driver_output_uri.
1956 &quot;driverOutputResourceUri&quot;: &quot;A String&quot;, # Output only. A URI pointing to the location of the stdout of the job&#x27;s driver program.
1957 &quot;hadoopJob&quot;: { # A Dataproc job for running Apache Hadoop MapReduce (https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) jobs on Apache Hadoop YARN (https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). # Optional. Job is a Hadoop job.
1958 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip.
1959 &quot;A String&quot;,
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001960 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001961 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
1962 &quot;A String&quot;,
1963 ],
1964 &quot;fileUris&quot;: [ # Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks.
1965 &quot;A String&quot;,
1966 ],
1967 &quot;jarFileUris&quot;: [ # Optional. Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks.
1968 &quot;A String&quot;,
1969 ],
1970 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
1971 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
1972 &quot;a_key&quot;: &quot;A String&quot;,
1973 },
1974 },
1975 &quot;mainClass&quot;: &quot;A String&quot;, # The name of the driver&#x27;s main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris.
1976 &quot;mainJarFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the jar file containing the main class. Examples: &#x27;gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar&#x27; &#x27;hdfs:/tmp/test-samples/custom-wordcount.jar&#x27; &#x27;file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar&#x27;
1977 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001978 &quot;a_key&quot;: &quot;A String&quot;,
1979 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001980 },
1981 &quot;hiveJob&quot;: { # A Dataproc job for running Apache Hive (https://hive.apache.org/) queries on YARN. # Optional. Job is a Hive job.
1982 &quot;continueOnFailure&quot;: True or False, # Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
1983 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.
1984 &quot;A String&quot;,
1985 ],
1986 &quot;properties&quot;: { # Optional. A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.
1987 &quot;a_key&quot;: &quot;A String&quot;,
1988 },
1989 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains Hive queries.
1990 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
1991 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
1992 &quot;A String&quot;,
1993 ],
1994 },
1995 &quot;scriptVariables&quot;: { # Optional. Mapping of query variable names to values (equivalent to the Hive command: SET name=&quot;value&quot;;).
1996 &quot;a_key&quot;: &quot;A String&quot;,
1997 },
1998 },
1999 &quot;jobUuid&quot;: &quot;A String&quot;, # Output only. A UUID that uniquely identifies a job within the project over time. This is in contrast to a user-settable reference.job_id that may be reused over time.
2000 &quot;labels&quot;: { # Optional. The labels to associate with this job. 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 job.
2001 &quot;a_key&quot;: &quot;A String&quot;,
2002 },
2003 &quot;pigJob&quot;: { # A Dataproc job for running Apache Pig (https://pig.apache.org/) queries on YARN. # Optional. Job is a Pig job.
2004 &quot;continueOnFailure&quot;: True or False, # Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
2005 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
2006 &quot;A String&quot;,
2007 ],
2008 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
2009 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
2010 &quot;a_key&quot;: &quot;A String&quot;,
2011 },
2012 },
2013 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.
2014 &quot;a_key&quot;: &quot;A String&quot;,
2015 },
2016 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains the Pig queries.
2017 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
2018 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
2019 &quot;A String&quot;,
2020 ],
2021 },
2022 &quot;scriptVariables&quot;: { # Optional. Mapping of query variable names to values (equivalent to the Pig command: name=[value]).
2023 &quot;a_key&quot;: &quot;A String&quot;,
2024 },
2025 },
2026 &quot;placement&quot;: { # Dataproc job config. # Required. Job information, including how, when, and where to run the job.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002027 &quot;clusterLabels&quot;: { # Optional. Cluster labels to identify a cluster where the job will be submitted.
2028 &quot;a_key&quot;: &quot;A String&quot;,
2029 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002030 &quot;clusterName&quot;: &quot;A String&quot;, # Required. The name of the cluster where the job will be submitted.
2031 &quot;clusterUuid&quot;: &quot;A String&quot;, # Output only. A cluster UUID generated by the Dataproc service when the job is submitted.
2032 },
2033 &quot;prestoJob&quot;: { # A Dataproc job for running Presto (https://prestosql.io/) queries. IMPORTANT: The Dataproc Presto Optional Component (https://cloud.google.com/dataproc/docs/concepts/components/presto) must be enabled when the cluster is created to submit a Presto job to the cluster. # Optional. Job is a Presto job.
2034 &quot;clientTags&quot;: [ # Optional. Presto client tags to attach to this query
2035 &quot;A String&quot;,
2036 ],
2037 &quot;continueOnFailure&quot;: True or False, # Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
2038 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
2039 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
2040 &quot;a_key&quot;: &quot;A String&quot;,
2041 },
2042 },
2043 &quot;outputFormat&quot;: &quot;A String&quot;, # Optional. The format in which query output will be displayed. See the Presto documentation for supported output formats
2044 &quot;properties&quot;: { # Optional. A mapping of property names to values. Used to set Presto session properties (https://prestodb.io/docs/current/sql/set-session.html) Equivalent to using the --session flag in the Presto CLI
2045 &quot;a_key&quot;: &quot;A String&quot;,
2046 },
2047 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains SQL queries.
2048 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
2049 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
2050 &quot;A String&quot;,
2051 ],
2052 },
2053 },
2054 &quot;pysparkJob&quot;: { # A Dataproc job for running Apache PySpark (https://spark.apache.org/docs/0.9.0/python-programming-guide.html) applications on YARN. # Optional. Job is a PySpark job.
2055 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
2056 &quot;A String&quot;,
2057 ],
2058 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
2059 &quot;A String&quot;,
2060 ],
2061 &quot;fileUris&quot;: [ # Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks.
2062 &quot;A String&quot;,
2063 ],
2064 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks.
2065 &quot;A String&quot;,
2066 ],
2067 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
2068 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
2069 &quot;a_key&quot;: &quot;A String&quot;,
2070 },
2071 },
2072 &quot;mainPythonFileUri&quot;: &quot;A String&quot;, # Required. The HCFS URI of the main Python file to use as the driver. Must be a .py file.
2073 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.
2074 &quot;a_key&quot;: &quot;A String&quot;,
2075 },
2076 &quot;pythonFileUris&quot;: [ # Optional. HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip.
2077 &quot;A String&quot;,
2078 ],
2079 },
2080 &quot;reference&quot;: { # Encapsulates the full scoping used to reference a job. # Optional. The fully qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not specified when a job is created, the server generates a job_id.
2081 &quot;jobId&quot;: &quot;A String&quot;, # Optional. The job ID, which must be unique within the project.The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 100 characters.If not specified by the caller, the job ID will be provided by the server.
2082 &quot;projectId&quot;: &quot;A String&quot;, # Optional. The ID of the Google Cloud Platform project that the job belongs to. If specified, must match the request project ID.
2083 },
2084 &quot;scheduling&quot;: { # Job scheduling options. # Optional. Job scheduling configuration.
2085 &quot;maxFailuresPerHour&quot;: 42, # Optional. Maximum number of times per hour a driver may be restarted as a result of driver exiting with non-zero code before job is reported failed.A job may be reported as thrashing if driver exits with non-zero code 4 times within 10 minute window.Maximum value is 10.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002086 &quot;maxFailuresTotal&quot;: 42, # Optional. Maximum number of times in total a driver may be restarted as a result of driver exiting with non-zero code before job is reported failed. Maximum value is 240.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002087 },
2088 &quot;sparkJob&quot;: { # A Dataproc job for running Apache Spark (http://spark.apache.org/) applications on YARN. # Optional. Job is a Spark job.
2089 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
2090 &quot;A String&quot;,
2091 ],
2092 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
2093 &quot;A String&quot;,
2094 ],
2095 &quot;fileUris&quot;: [ # Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks.
2096 &quot;A String&quot;,
2097 ],
2098 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks.
2099 &quot;A String&quot;,
2100 ],
2101 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
2102 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
2103 &quot;a_key&quot;: &quot;A String&quot;,
2104 },
2105 },
2106 &quot;mainClass&quot;: &quot;A String&quot;, # The name of the driver&#x27;s main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris.
2107 &quot;mainJarFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the jar file that contains the main class.
2108 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.
2109 &quot;a_key&quot;: &quot;A String&quot;,
2110 },
2111 },
2112 &quot;sparkRJob&quot;: { # A Dataproc job for running Apache SparkR (https://spark.apache.org/docs/latest/sparkr.html) applications on YARN. # Optional. Job is a SparkR job.
2113 &quot;archiveUris&quot;: [ # Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
2114 &quot;A String&quot;,
2115 ],
2116 &quot;args&quot;: [ # Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.
2117 &quot;A String&quot;,
2118 ],
2119 &quot;fileUris&quot;: [ # Optional. HCFS URIs of files to be placed in the working directory of each executor. Useful for naively parallel tasks.
2120 &quot;A String&quot;,
2121 ],
2122 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
2123 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
2124 &quot;a_key&quot;: &quot;A String&quot;,
2125 },
2126 },
2127 &quot;mainRFileUri&quot;: &quot;A String&quot;, # Required. The HCFS URI of the main R file to use as the driver. Must be a .R file.
2128 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure SparkR. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.
2129 &quot;a_key&quot;: &quot;A String&quot;,
2130 },
2131 },
2132 &quot;sparkSqlJob&quot;: { # A Dataproc job for running Apache Spark SQL (http://spark.apache.org/sql/) queries. # Optional. Job is a SparkSql job.
2133 &quot;jarFileUris&quot;: [ # Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
2134 &quot;A String&quot;,
2135 ],
2136 &quot;loggingConfig&quot;: { # The runtime logging config of the job. # Optional. The runtime log config for job execution.
2137 &quot;driverLogLevels&quot;: { # The per-package log levels for the driver. This may include &quot;root&quot; package name to configure rootLogger. Examples: &#x27;com.google = FATAL&#x27;, &#x27;root = INFO&#x27;, &#x27;org.apache = DEBUG&#x27;
2138 &quot;a_key&quot;: &quot;A String&quot;,
2139 },
2140 },
2141 &quot;properties&quot;: { # Optional. A mapping of property names to values, used to configure Spark SQL&#x27;s SparkConf. Properties that conflict with values set by the Dataproc API may be overwritten.
2142 &quot;a_key&quot;: &quot;A String&quot;,
2143 },
2144 &quot;queryFileUri&quot;: &quot;A String&quot;, # The HCFS URI of the script that contains SQL queries.
2145 &quot;queryList&quot;: { # A list of queries to run on a cluster. # A list of queries.
2146 &quot;queries&quot;: [ # Required. The queries to execute. You do not need to end a query expression with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of a Dataproc API snippet that uses a QueryList to specify a HiveJob: &quot;hiveJob&quot;: { &quot;queryList&quot;: { &quot;queries&quot;: [ &quot;query1&quot;, &quot;query2&quot;, &quot;query3;query4&quot;, ] } }
2147 &quot;A String&quot;,
2148 ],
2149 },
2150 &quot;scriptVariables&quot;: { # Optional. Mapping of query variable names to values (equivalent to the Spark SQL command: SET name=&quot;value&quot;;).
2151 &quot;a_key&quot;: &quot;A String&quot;,
2152 },
2153 },
2154 &quot;status&quot;: { # Dataproc job status. # Output only. The job status. Additional application-specific status information may be contained in the type_job and yarn_applications fields.
2155 &quot;details&quot;: &quot;A String&quot;, # Optional. Output only. Job state details, such as an error description if the state is ERROR.
2156 &quot;state&quot;: &quot;A String&quot;, # Output only. A state message specifying the overall job state.
2157 &quot;stateStartTime&quot;: &quot;A String&quot;, # Output only. The time when this state was entered.
2158 &quot;substate&quot;: &quot;A String&quot;, # Output only. Additional state information, which includes status reported by the agent.
2159 },
2160 &quot;statusHistory&quot;: [ # Output only. The previous job status.
2161 { # Dataproc job status.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002162 &quot;details&quot;: &quot;A String&quot;, # Optional. Output only. Job state details, such as an error description if the state is ERROR.
2163 &quot;state&quot;: &quot;A String&quot;, # Output only. A state message specifying the overall job state.
2164 &quot;stateStartTime&quot;: &quot;A String&quot;, # Output only. The time when this state was entered.
2165 &quot;substate&quot;: &quot;A String&quot;, # Output only. Additional state information, which includes status reported by the agent.
2166 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002167 ],
2168 &quot;yarnApplications&quot;: [ # Output only. The collection of YARN applications spun up by this job.Beta Feature: This report is available for testing purposes only. It may be changed before final release.
2169 { # A YARN application created by a job. Application information is a subset of org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto.Beta Feature: This report is available for testing purposes only. It may be changed before final release.
2170 &quot;name&quot;: &quot;A String&quot;, # Required. The application name.
2171 &quot;progress&quot;: 3.14, # Required. The numerical progress of the application, from 1 to 100.
2172 &quot;state&quot;: &quot;A String&quot;, # Required. The application state.
2173 &quot;trackingUrl&quot;: &quot;A String&quot;, # Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002174 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002175 ],
2176 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002177 &quot;requestId&quot;: &quot;A String&quot;, # Optional. A unique id used to identify the request. If the server receives two SubmitJobRequest (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.SubmitJobRequest)s with the same id, then the second request will be ignored and the first Job created and stored in the backend is returned.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002178}
Dan O'Mearadd494642020-05-01 07:42:23 -07002179
2180 x__xgafv: string, V1 error format.
2181 Allowed values
2182 1 - v1 error format
2183 2 - v2 error format
2184
2185Returns:
2186 An object of the form:
2187
2188 { # This resource represents a long-running operation that is the result of a network API call.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002189 &quot;done&quot;: True or False, # If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.
2190 &quot;error&quot;: { # The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
2191 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
2192 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
2193 {
2194 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2195 },
2196 ],
2197 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
2198 },
2199 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
2200 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2201 },
2202 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}.
2203 &quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.
2204 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2205 },
2206}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -07002207</div>
2208
2209<div class="method">
2210 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07002211 <pre>Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may &quot;fail open&quot; without warning.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002212
2213Args:
2214 resource: string, REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002215 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002216 The object takes the form of:
2217
2218{ # Request message for TestIamPermissions method.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002219 &quot;permissions&quot;: [ # The set of permissions to check for the resource. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more information see IAM Overview (https://cloud.google.com/iam/docs/overview#permissions).
2220 &quot;A String&quot;,
2221 ],
2222}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002223
2224 x__xgafv: string, V1 error format.
2225 Allowed values
2226 1 - v1 error format
2227 2 - v2 error format
2228
2229Returns:
2230 An object of the form:
2231
2232 { # Response message for TestIamPermissions method.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002233 &quot;permissions&quot;: [ # A subset of TestPermissionsRequest.permissions that the caller is allowed.
2234 &quot;A String&quot;,
2235 ],
2236}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002237</div>
2238
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002239</body></html>