google-cloud-dataproc 5.18.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. google/cloud/dataproc/__init__.py +409 -0
  2. google/cloud/dataproc/gapic_version.py +16 -0
  3. google/cloud/dataproc/py.typed +2 -0
  4. google/cloud/dataproc_v1/__init__.py +389 -0
  5. google/cloud/dataproc_v1/gapic_metadata.json +821 -0
  6. google/cloud/dataproc_v1/gapic_version.py +16 -0
  7. google/cloud/dataproc_v1/py.typed +2 -0
  8. google/cloud/dataproc_v1/services/__init__.py +15 -0
  9. google/cloud/dataproc_v1/services/autoscaling_policy_service/__init__.py +22 -0
  10. google/cloud/dataproc_v1/services/autoscaling_policy_service/async_client.py +1488 -0
  11. google/cloud/dataproc_v1/services/autoscaling_policy_service/client.py +1924 -0
  12. google/cloud/dataproc_v1/services/autoscaling_policy_service/pagers.py +201 -0
  13. google/cloud/dataproc_v1/services/autoscaling_policy_service/transports/__init__.py +41 -0
  14. google/cloud/dataproc_v1/services/autoscaling_policy_service/transports/base.py +361 -0
  15. google/cloud/dataproc_v1/services/autoscaling_policy_service/transports/grpc.py +635 -0
  16. google/cloud/dataproc_v1/services/autoscaling_policy_service/transports/grpc_asyncio.py +743 -0
  17. google/cloud/dataproc_v1/services/autoscaling_policy_service/transports/rest.py +2358 -0
  18. google/cloud/dataproc_v1/services/autoscaling_policy_service/transports/rest_base.py +671 -0
  19. google/cloud/dataproc_v1/services/batch_controller/__init__.py +22 -0
  20. google/cloud/dataproc_v1/services/batch_controller/async_client.py +1330 -0
  21. google/cloud/dataproc_v1/services/batch_controller/client.py +1786 -0
  22. google/cloud/dataproc_v1/services/batch_controller/pagers.py +197 -0
  23. google/cloud/dataproc_v1/services/batch_controller/transports/__init__.py +36 -0
  24. google/cloud/dataproc_v1/services/batch_controller/transports/base.py +308 -0
  25. google/cloud/dataproc_v1/services/batch_controller/transports/grpc.py +606 -0
  26. google/cloud/dataproc_v1/services/batch_controller/transports/grpc_asyncio.py +682 -0
  27. google/cloud/dataproc_v1/services/batch_controller/transports/rest.py +2118 -0
  28. google/cloud/dataproc_v1/services/batch_controller/transports/rest_base.py +592 -0
  29. google/cloud/dataproc_v1/services/cluster_controller/__init__.py +22 -0
  30. google/cloud/dataproc_v1/services/cluster_controller/async_client.py +2096 -0
  31. google/cloud/dataproc_v1/services/cluster_controller/client.py +2587 -0
  32. google/cloud/dataproc_v1/services/cluster_controller/pagers.py +197 -0
  33. google/cloud/dataproc_v1/services/cluster_controller/transports/__init__.py +36 -0
  34. google/cloud/dataproc_v1/services/cluster_controller/transports/base.py +423 -0
  35. google/cloud/dataproc_v1/services/cluster_controller/transports/grpc.py +729 -0
  36. google/cloud/dataproc_v1/services/cluster_controller/transports/grpc_asyncio.py +885 -0
  37. google/cloud/dataproc_v1/services/cluster_controller/transports/rest.py +3062 -0
  38. google/cloud/dataproc_v1/services/cluster_controller/transports/rest_base.py +821 -0
  39. google/cloud/dataproc_v1/services/job_controller/__init__.py +22 -0
  40. google/cloud/dataproc_v1/services/job_controller/async_client.py +1787 -0
  41. google/cloud/dataproc_v1/services/job_controller/client.py +2195 -0
  42. google/cloud/dataproc_v1/services/job_controller/pagers.py +197 -0
  43. google/cloud/dataproc_v1/services/job_controller/transports/__init__.py +36 -0
  44. google/cloud/dataproc_v1/services/job_controller/transports/base.py +408 -0
  45. google/cloud/dataproc_v1/services/job_controller/transports/grpc.py +678 -0
  46. google/cloud/dataproc_v1/services/job_controller/transports/grpc_asyncio.py +838 -0
  47. google/cloud/dataproc_v1/services/job_controller/transports/rest.py +2753 -0
  48. google/cloud/dataproc_v1/services/job_controller/transports/rest_base.py +765 -0
  49. google/cloud/dataproc_v1/services/node_group_controller/__init__.py +22 -0
  50. google/cloud/dataproc_v1/services/node_group_controller/async_client.py +1255 -0
  51. google/cloud/dataproc_v1/services/node_group_controller/client.py +1695 -0
  52. google/cloud/dataproc_v1/services/node_group_controller/transports/__init__.py +38 -0
  53. google/cloud/dataproc_v1/services/node_group_controller/transports/base.py +295 -0
  54. google/cloud/dataproc_v1/services/node_group_controller/transports/grpc.py +585 -0
  55. google/cloud/dataproc_v1/services/node_group_controller/transports/grpc_asyncio.py +656 -0
  56. google/cloud/dataproc_v1/services/node_group_controller/transports/rest.py +2017 -0
  57. google/cloud/dataproc_v1/services/node_group_controller/transports/rest_base.py +554 -0
  58. google/cloud/dataproc_v1/services/session_controller/__init__.py +22 -0
  59. google/cloud/dataproc_v1/services/session_controller/async_client.py +1488 -0
  60. google/cloud/dataproc_v1/services/session_controller/client.py +1960 -0
  61. google/cloud/dataproc_v1/services/session_controller/pagers.py +197 -0
  62. google/cloud/dataproc_v1/services/session_controller/transports/__init__.py +36 -0
  63. google/cloud/dataproc_v1/services/session_controller/transports/base.py +323 -0
  64. google/cloud/dataproc_v1/services/session_controller/transports/grpc.py +633 -0
  65. google/cloud/dataproc_v1/services/session_controller/transports/grpc_asyncio.py +716 -0
  66. google/cloud/dataproc_v1/services/session_controller/transports/rest.py +2416 -0
  67. google/cloud/dataproc_v1/services/session_controller/transports/rest_base.py +650 -0
  68. google/cloud/dataproc_v1/services/session_template_controller/__init__.py +22 -0
  69. google/cloud/dataproc_v1/services/session_template_controller/async_client.py +1442 -0
  70. google/cloud/dataproc_v1/services/session_template_controller/client.py +1886 -0
  71. google/cloud/dataproc_v1/services/session_template_controller/pagers.py +201 -0
  72. google/cloud/dataproc_v1/services/session_template_controller/transports/__init__.py +41 -0
  73. google/cloud/dataproc_v1/services/session_template_controller/transports/base.py +331 -0
  74. google/cloud/dataproc_v1/services/session_template_controller/transports/grpc.py +628 -0
  75. google/cloud/dataproc_v1/services/session_template_controller/transports/grpc_asyncio.py +708 -0
  76. google/cloud/dataproc_v1/services/session_template_controller/transports/rest.py +2349 -0
  77. google/cloud/dataproc_v1/services/session_template_controller/transports/rest_base.py +649 -0
  78. google/cloud/dataproc_v1/services/workflow_template_service/__init__.py +22 -0
  79. google/cloud/dataproc_v1/services/workflow_template_service/async_client.py +1885 -0
  80. google/cloud/dataproc_v1/services/workflow_template_service/client.py +2370 -0
  81. google/cloud/dataproc_v1/services/workflow_template_service/pagers.py +201 -0
  82. google/cloud/dataproc_v1/services/workflow_template_service/transports/__init__.py +41 -0
  83. google/cloud/dataproc_v1/services/workflow_template_service/transports/base.py +431 -0
  84. google/cloud/dataproc_v1/services/workflow_template_service/transports/grpc.py +760 -0
  85. google/cloud/dataproc_v1/services/workflow_template_service/transports/grpc_asyncio.py +916 -0
  86. google/cloud/dataproc_v1/services/workflow_template_service/transports/rest.py +2882 -0
  87. google/cloud/dataproc_v1/services/workflow_template_service/transports/rest_base.py +799 -0
  88. google/cloud/dataproc_v1/types/__init__.py +342 -0
  89. google/cloud/dataproc_v1/types/autoscaling_policies.py +448 -0
  90. google/cloud/dataproc_v1/types/batches.py +642 -0
  91. google/cloud/dataproc_v1/types/clusters.py +2671 -0
  92. google/cloud/dataproc_v1/types/jobs.py +1822 -0
  93. google/cloud/dataproc_v1/types/node_groups.py +166 -0
  94. google/cloud/dataproc_v1/types/operations.py +395 -0
  95. google/cloud/dataproc_v1/types/session_templates.py +284 -0
  96. google/cloud/dataproc_v1/types/sessions.py +504 -0
  97. google/cloud/dataproc_v1/types/shared.py +1010 -0
  98. google/cloud/dataproc_v1/types/workflow_templates.py +1229 -0
  99. google_cloud_dataproc-5.18.1.dist-info/LICENSE +202 -0
  100. google_cloud_dataproc-5.18.1.dist-info/METADATA +229 -0
  101. google_cloud_dataproc-5.18.1.dist-info/RECORD +103 -0
  102. google_cloud_dataproc-5.18.1.dist-info/WHEEL +5 -0
  103. google_cloud_dataproc-5.18.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1010 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2024 Google LLC
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+ from __future__ import annotations
17
+
18
+ from typing import MutableMapping, MutableSequence
19
+
20
+ from google.protobuf import duration_pb2 # type: ignore
21
+ from google.protobuf import timestamp_pb2 # type: ignore
22
+ import proto # type: ignore
23
+
24
+ __protobuf__ = proto.module(
25
+ package="google.cloud.dataproc.v1",
26
+ manifest={
27
+ "Component",
28
+ "FailureAction",
29
+ "RuntimeConfig",
30
+ "EnvironmentConfig",
31
+ "ExecutionConfig",
32
+ "SparkHistoryServerConfig",
33
+ "PeripheralsConfig",
34
+ "RuntimeInfo",
35
+ "UsageMetrics",
36
+ "UsageSnapshot",
37
+ "GkeClusterConfig",
38
+ "KubernetesClusterConfig",
39
+ "KubernetesSoftwareConfig",
40
+ "GkeNodePoolTarget",
41
+ "GkeNodePoolConfig",
42
+ "AuthenticationConfig",
43
+ "AutotuningConfig",
44
+ "RepositoryConfig",
45
+ "PyPiRepositoryConfig",
46
+ },
47
+ )
48
+
49
+
50
+ class Component(proto.Enum):
51
+ r"""Cluster components that can be activated.
52
+
53
+ Values:
54
+ COMPONENT_UNSPECIFIED (0):
55
+ Unspecified component. Specifying this will
56
+ cause Cluster creation to fail.
57
+ ANACONDA (5):
58
+ The Anaconda component is no longer supported or applicable
59
+ to [supported Dataproc on Compute Engine image versions]
60
+ (https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-version-clusters#supported-dataproc-image-versions).
61
+ It cannot be activated on clusters created with supported
62
+ Dataproc on Compute Engine image versions.
63
+ DOCKER (13):
64
+ Docker
65
+ DRUID (9):
66
+ The Druid query engine. (alpha)
67
+ FLINK (14):
68
+ Flink
69
+ HBASE (11):
70
+ HBase. (beta)
71
+ HIVE_WEBHCAT (3):
72
+ The Hive Web HCatalog (the REST service for
73
+ accessing HCatalog).
74
+ HUDI (18):
75
+ Hudi.
76
+ JUPYTER (1):
77
+ The Jupyter Notebook.
78
+ PRESTO (6):
79
+ The Presto query engine.
80
+ TRINO (17):
81
+ The Trino query engine.
82
+ RANGER (12):
83
+ The Ranger service.
84
+ SOLR (10):
85
+ The Solr service.
86
+ ZEPPELIN (4):
87
+ The Zeppelin notebook.
88
+ ZOOKEEPER (8):
89
+ The Zookeeper service.
90
+ """
91
+ COMPONENT_UNSPECIFIED = 0
92
+ ANACONDA = 5
93
+ DOCKER = 13
94
+ DRUID = 9
95
+ FLINK = 14
96
+ HBASE = 11
97
+ HIVE_WEBHCAT = 3
98
+ HUDI = 18
99
+ JUPYTER = 1
100
+ PRESTO = 6
101
+ TRINO = 17
102
+ RANGER = 12
103
+ SOLR = 10
104
+ ZEPPELIN = 4
105
+ ZOOKEEPER = 8
106
+
107
+
108
+ class FailureAction(proto.Enum):
109
+ r"""Actions in response to failure of a resource associated with
110
+ a cluster.
111
+
112
+ Values:
113
+ FAILURE_ACTION_UNSPECIFIED (0):
114
+ When FailureAction is unspecified, failure action defaults
115
+ to NO_ACTION.
116
+ NO_ACTION (1):
117
+ Take no action on failure to create a cluster resource.
118
+ NO_ACTION is the default.
119
+ DELETE (2):
120
+ Delete the failed cluster resource.
121
+ """
122
+ FAILURE_ACTION_UNSPECIFIED = 0
123
+ NO_ACTION = 1
124
+ DELETE = 2
125
+
126
+
127
+ class RuntimeConfig(proto.Message):
128
+ r"""Runtime configuration for a workload.
129
+
130
+ Attributes:
131
+ version (str):
132
+ Optional. Version of the batch runtime.
133
+ container_image (str):
134
+ Optional. Optional custom container image for
135
+ the job runtime environment. If not specified, a
136
+ default container image will be used.
137
+ properties (MutableMapping[str, str]):
138
+ Optional. A mapping of property names to
139
+ values, which are used to configure workload
140
+ execution.
141
+ repository_config (google.cloud.dataproc_v1.types.RepositoryConfig):
142
+ Optional. Dependency repository
143
+ configuration.
144
+ autotuning_config (google.cloud.dataproc_v1.types.AutotuningConfig):
145
+ Optional. Autotuning configuration of the
146
+ workload.
147
+ cohort (str):
148
+ Optional. Cohort identifier. Identifies
149
+ families of the workloads having the same shape,
150
+ e.g. daily ETL jobs.
151
+ """
152
+
153
+ version: str = proto.Field(
154
+ proto.STRING,
155
+ number=1,
156
+ )
157
+ container_image: str = proto.Field(
158
+ proto.STRING,
159
+ number=2,
160
+ )
161
+ properties: MutableMapping[str, str] = proto.MapField(
162
+ proto.STRING,
163
+ proto.STRING,
164
+ number=3,
165
+ )
166
+ repository_config: "RepositoryConfig" = proto.Field(
167
+ proto.MESSAGE,
168
+ number=5,
169
+ message="RepositoryConfig",
170
+ )
171
+ autotuning_config: "AutotuningConfig" = proto.Field(
172
+ proto.MESSAGE,
173
+ number=6,
174
+ message="AutotuningConfig",
175
+ )
176
+ cohort: str = proto.Field(
177
+ proto.STRING,
178
+ number=7,
179
+ )
180
+
181
+
182
+ class EnvironmentConfig(proto.Message):
183
+ r"""Environment configuration for a workload.
184
+
185
+ Attributes:
186
+ execution_config (google.cloud.dataproc_v1.types.ExecutionConfig):
187
+ Optional. Execution configuration for a
188
+ workload.
189
+ peripherals_config (google.cloud.dataproc_v1.types.PeripheralsConfig):
190
+ Optional. Peripherals configuration that
191
+ workload has access to.
192
+ """
193
+
194
+ execution_config: "ExecutionConfig" = proto.Field(
195
+ proto.MESSAGE,
196
+ number=1,
197
+ message="ExecutionConfig",
198
+ )
199
+ peripherals_config: "PeripheralsConfig" = proto.Field(
200
+ proto.MESSAGE,
201
+ number=2,
202
+ message="PeripheralsConfig",
203
+ )
204
+
205
+
206
+ class ExecutionConfig(proto.Message):
207
+ r"""Execution configuration for a workload.
208
+
209
+ This message has `oneof`_ fields (mutually exclusive fields).
210
+ For each oneof, at most one member field can be set at the same time.
211
+ Setting any member of the oneof automatically clears all other
212
+ members.
213
+
214
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
215
+
216
+ Attributes:
217
+ service_account (str):
218
+ Optional. Service account that used to
219
+ execute workload.
220
+ network_uri (str):
221
+ Optional. Network URI to connect workload to.
222
+
223
+ This field is a member of `oneof`_ ``network``.
224
+ subnetwork_uri (str):
225
+ Optional. Subnetwork URI to connect workload
226
+ to.
227
+
228
+ This field is a member of `oneof`_ ``network``.
229
+ network_tags (MutableSequence[str]):
230
+ Optional. Tags used for network traffic
231
+ control.
232
+ kms_key (str):
233
+ Optional. The Cloud KMS key to use for
234
+ encryption.
235
+ idle_ttl (google.protobuf.duration_pb2.Duration):
236
+ Optional. Applies to sessions only. The duration to keep the
237
+ session alive while it's idling. Exceeding this threshold
238
+ causes the session to terminate. This field cannot be set on
239
+ a batch workload. Minimum value is 10 minutes; maximum value
240
+ is 14 days (see JSON representation of
241
+ `Duration <https://developers.google.com/protocol-buffers/docs/proto3#json>`__).
242
+ Defaults to 1 hour if not set. If both ``ttl`` and
243
+ ``idle_ttl`` are specified for an interactive session, the
244
+ conditions are treated as ``OR`` conditions: the workload
245
+ will be terminated when it has been idle for ``idle_ttl`` or
246
+ when ``ttl`` has been exceeded, whichever occurs first.
247
+ ttl (google.protobuf.duration_pb2.Duration):
248
+ Optional. The duration after which the workload will be
249
+ terminated, specified as the JSON representation for
250
+ `Duration <https://protobuf.dev/programming-guides/proto3/#json>`__.
251
+ When the workload exceeds this duration, it will be
252
+ unconditionally terminated without waiting for ongoing work
253
+ to finish. If ``ttl`` is not specified for a batch workload,
254
+ the workload will be allowed to run until it exits naturally
255
+ (or run forever without exiting). If ``ttl`` is not
256
+ specified for an interactive session, it defaults to 24
257
+ hours. If ``ttl`` is not specified for a batch that uses
258
+ 2.1+ runtime version, it defaults to 4 hours. Minimum value
259
+ is 10 minutes; maximum value is 14 days. If both ``ttl`` and
260
+ ``idle_ttl`` are specified (for an interactive session), the
261
+ conditions are treated as ``OR`` conditions: the workload
262
+ will be terminated when it has been idle for ``idle_ttl`` or
263
+ when ``ttl`` has been exceeded, whichever occurs first.
264
+ staging_bucket (str):
265
+ Optional. A Cloud Storage bucket used to stage workload
266
+ dependencies, config files, and store workload output and
267
+ other ephemeral data, such as Spark history files. If you do
268
+ not specify a staging bucket, Cloud Dataproc will determine
269
+ a Cloud Storage location according to the region where your
270
+ workload is running, and then create and manage
271
+ project-level, per-location staging and temporary buckets.
272
+ **This field requires a Cloud Storage bucket name, not a
273
+ ``gs://...`` URI to a Cloud Storage bucket.**
274
+ authentication_config (google.cloud.dataproc_v1.types.AuthenticationConfig):
275
+ Optional. Authentication configuration used
276
+ to set the default identity for the workload
277
+ execution. The config specifies the type of
278
+ identity (service account or user) that will be
279
+ used by workloads to access resources on the
280
+ project(s).
281
+ """
282
+
283
+ service_account: str = proto.Field(
284
+ proto.STRING,
285
+ number=2,
286
+ )
287
+ network_uri: str = proto.Field(
288
+ proto.STRING,
289
+ number=4,
290
+ oneof="network",
291
+ )
292
+ subnetwork_uri: str = proto.Field(
293
+ proto.STRING,
294
+ number=5,
295
+ oneof="network",
296
+ )
297
+ network_tags: MutableSequence[str] = proto.RepeatedField(
298
+ proto.STRING,
299
+ number=6,
300
+ )
301
+ kms_key: str = proto.Field(
302
+ proto.STRING,
303
+ number=7,
304
+ )
305
+ idle_ttl: duration_pb2.Duration = proto.Field(
306
+ proto.MESSAGE,
307
+ number=8,
308
+ message=duration_pb2.Duration,
309
+ )
310
+ ttl: duration_pb2.Duration = proto.Field(
311
+ proto.MESSAGE,
312
+ number=9,
313
+ message=duration_pb2.Duration,
314
+ )
315
+ staging_bucket: str = proto.Field(
316
+ proto.STRING,
317
+ number=10,
318
+ )
319
+ authentication_config: "AuthenticationConfig" = proto.Field(
320
+ proto.MESSAGE,
321
+ number=11,
322
+ message="AuthenticationConfig",
323
+ )
324
+
325
+
326
+ class SparkHistoryServerConfig(proto.Message):
327
+ r"""Spark History Server configuration for the workload.
328
+
329
+ Attributes:
330
+ dataproc_cluster (str):
331
+ Optional. Resource name of an existing Dataproc Cluster to
332
+ act as a Spark History Server for the workload.
333
+
334
+ Example:
335
+
336
+ - ``projects/[project_id]/regions/[region]/clusters/[cluster_name]``
337
+ """
338
+
339
+ dataproc_cluster: str = proto.Field(
340
+ proto.STRING,
341
+ number=1,
342
+ )
343
+
344
+
345
+ class PeripheralsConfig(proto.Message):
346
+ r"""Auxiliary services configuration for a workload.
347
+
348
+ Attributes:
349
+ metastore_service (str):
350
+ Optional. Resource name of an existing Dataproc Metastore
351
+ service.
352
+
353
+ Example:
354
+
355
+ - ``projects/[project_id]/locations/[region]/services/[service_id]``
356
+ spark_history_server_config (google.cloud.dataproc_v1.types.SparkHistoryServerConfig):
357
+ Optional. The Spark History Server
358
+ configuration for the workload.
359
+ """
360
+
361
+ metastore_service: str = proto.Field(
362
+ proto.STRING,
363
+ number=1,
364
+ )
365
+ spark_history_server_config: "SparkHistoryServerConfig" = proto.Field(
366
+ proto.MESSAGE,
367
+ number=2,
368
+ message="SparkHistoryServerConfig",
369
+ )
370
+
371
+
372
+ class RuntimeInfo(proto.Message):
373
+ r"""Runtime information about workload execution.
374
+
375
+ Attributes:
376
+ endpoints (MutableMapping[str, str]):
377
+ Output only. Map of remote access endpoints
378
+ (such as web interfaces and APIs) to their URIs.
379
+ output_uri (str):
380
+ Output only. A URI pointing to the location
381
+ of the stdout and stderr of the workload.
382
+ diagnostic_output_uri (str):
383
+ Output only. A URI pointing to the location
384
+ of the diagnostics tarball.
385
+ approximate_usage (google.cloud.dataproc_v1.types.UsageMetrics):
386
+ Output only. Approximate workload resource usage, calculated
387
+ when the workload completes (see [Dataproc Serverless
388
+ pricing]
389
+ (https://cloud.google.com/dataproc-serverless/pricing)).
390
+
391
+ **Note:** This metric calculation may change in the future,
392
+ for example, to capture cumulative workload resource
393
+ consumption during workload execution (see the [Dataproc
394
+ Serverless release notes]
395
+ (https://cloud.google.com/dataproc-serverless/docs/release-notes)
396
+ for announcements, changes, fixes and other Dataproc
397
+ developments).
398
+ current_usage (google.cloud.dataproc_v1.types.UsageSnapshot):
399
+ Output only. Snapshot of current workload
400
+ resource usage.
401
+ """
402
+
403
+ endpoints: MutableMapping[str, str] = proto.MapField(
404
+ proto.STRING,
405
+ proto.STRING,
406
+ number=1,
407
+ )
408
+ output_uri: str = proto.Field(
409
+ proto.STRING,
410
+ number=2,
411
+ )
412
+ diagnostic_output_uri: str = proto.Field(
413
+ proto.STRING,
414
+ number=3,
415
+ )
416
+ approximate_usage: "UsageMetrics" = proto.Field(
417
+ proto.MESSAGE,
418
+ number=6,
419
+ message="UsageMetrics",
420
+ )
421
+ current_usage: "UsageSnapshot" = proto.Field(
422
+ proto.MESSAGE,
423
+ number=7,
424
+ message="UsageSnapshot",
425
+ )
426
+
427
+
428
+ class UsageMetrics(proto.Message):
429
+ r"""Usage metrics represent approximate total resources consumed
430
+ by a workload.
431
+
432
+ Attributes:
433
+ milli_dcu_seconds (int):
434
+ Optional. DCU (Dataproc Compute Units) usage in
435
+ (``milliDCU`` x ``seconds``) (see [Dataproc Serverless
436
+ pricing]
437
+ (https://cloud.google.com/dataproc-serverless/pricing)).
438
+ shuffle_storage_gb_seconds (int):
439
+ Optional. Shuffle storage usage in (``GB`` x ``seconds``)
440
+ (see [Dataproc Serverless pricing]
441
+ (https://cloud.google.com/dataproc-serverless/pricing)).
442
+ milli_accelerator_seconds (int):
443
+ Optional. Accelerator usage in (``milliAccelerator`` x
444
+ ``seconds``) (see [Dataproc Serverless pricing]
445
+ (https://cloud.google.com/dataproc-serverless/pricing)).
446
+ accelerator_type (str):
447
+ Optional. Accelerator type being used, if any
448
+ """
449
+
450
+ milli_dcu_seconds: int = proto.Field(
451
+ proto.INT64,
452
+ number=1,
453
+ )
454
+ shuffle_storage_gb_seconds: int = proto.Field(
455
+ proto.INT64,
456
+ number=2,
457
+ )
458
+ milli_accelerator_seconds: int = proto.Field(
459
+ proto.INT64,
460
+ number=3,
461
+ )
462
+ accelerator_type: str = proto.Field(
463
+ proto.STRING,
464
+ number=4,
465
+ )
466
+
467
+
468
+ class UsageSnapshot(proto.Message):
469
+ r"""The usage snapshot represents the resources consumed by a
470
+ workload at a specified time.
471
+
472
+ Attributes:
473
+ milli_dcu (int):
474
+ Optional. Milli (one-thousandth) Dataproc Compute Units
475
+ (DCUs) (see [Dataproc Serverless pricing]
476
+ (https://cloud.google.com/dataproc-serverless/pricing)).
477
+ shuffle_storage_gb (int):
478
+ Optional. Shuffle Storage in gigabytes (GB). (see [Dataproc
479
+ Serverless pricing]
480
+ (https://cloud.google.com/dataproc-serverless/pricing))
481
+ milli_dcu_premium (int):
482
+ Optional. Milli (one-thousandth) Dataproc Compute Units
483
+ (DCUs) charged at premium tier (see [Dataproc Serverless
484
+ pricing]
485
+ (https://cloud.google.com/dataproc-serverless/pricing)).
486
+ shuffle_storage_gb_premium (int):
487
+ Optional. Shuffle Storage in gigabytes (GB) charged at
488
+ premium tier. (see [Dataproc Serverless pricing]
489
+ (https://cloud.google.com/dataproc-serverless/pricing))
490
+ milli_accelerator (int):
491
+ Optional. Milli (one-thousandth) accelerator. (see [Dataproc
492
+ Serverless pricing]
493
+ (https://cloud.google.com/dataproc-serverless/pricing))
494
+ accelerator_type (str):
495
+ Optional. Accelerator type being used, if any
496
+ snapshot_time (google.protobuf.timestamp_pb2.Timestamp):
497
+ Optional. The timestamp of the usage
498
+ snapshot.
499
+ """
500
+
501
+ milli_dcu: int = proto.Field(
502
+ proto.INT64,
503
+ number=1,
504
+ )
505
+ shuffle_storage_gb: int = proto.Field(
506
+ proto.INT64,
507
+ number=2,
508
+ )
509
+ milli_dcu_premium: int = proto.Field(
510
+ proto.INT64,
511
+ number=4,
512
+ )
513
+ shuffle_storage_gb_premium: int = proto.Field(
514
+ proto.INT64,
515
+ number=5,
516
+ )
517
+ milli_accelerator: int = proto.Field(
518
+ proto.INT64,
519
+ number=6,
520
+ )
521
+ accelerator_type: str = proto.Field(
522
+ proto.STRING,
523
+ number=7,
524
+ )
525
+ snapshot_time: timestamp_pb2.Timestamp = proto.Field(
526
+ proto.MESSAGE,
527
+ number=3,
528
+ message=timestamp_pb2.Timestamp,
529
+ )
530
+
531
+
532
+ class GkeClusterConfig(proto.Message):
533
+ r"""The cluster's GKE config.
534
+
535
+ Attributes:
536
+ gke_cluster_target (str):
537
+ Optional. A target GKE cluster to deploy to. It must be in
538
+ the same project and region as the Dataproc cluster (the GKE
539
+ cluster can be zonal or regional). Format:
540
+ 'projects/{project}/locations/{location}/clusters/{cluster_id}'
541
+ node_pool_target (MutableSequence[google.cloud.dataproc_v1.types.GkeNodePoolTarget]):
542
+ Optional. GKE node pools where workloads will be scheduled.
543
+ At least one node pool must be assigned the ``DEFAULT``
544
+ [GkeNodePoolTarget.Role][google.cloud.dataproc.v1.GkeNodePoolTarget.Role].
545
+ If a ``GkeNodePoolTarget`` is not specified, Dataproc
546
+ constructs a ``DEFAULT`` ``GkeNodePoolTarget``. Each role
547
+ can be given to only one ``GkeNodePoolTarget``. All node
548
+ pools must have the same location settings.
549
+ """
550
+
551
+ gke_cluster_target: str = proto.Field(
552
+ proto.STRING,
553
+ number=2,
554
+ )
555
+ node_pool_target: MutableSequence["GkeNodePoolTarget"] = proto.RepeatedField(
556
+ proto.MESSAGE,
557
+ number=3,
558
+ message="GkeNodePoolTarget",
559
+ )
560
+
561
+
562
+ class KubernetesClusterConfig(proto.Message):
563
+ r"""The configuration for running the Dataproc cluster on
564
+ Kubernetes.
565
+
566
+
567
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
568
+
569
+ Attributes:
570
+ kubernetes_namespace (str):
571
+ Optional. A namespace within the Kubernetes
572
+ cluster to deploy into. If this namespace does
573
+ not exist, it is created. If it exists, Dataproc
574
+ verifies that another Dataproc VirtualCluster is
575
+ not installed into it. If not specified, the
576
+ name of the Dataproc Cluster is used.
577
+ gke_cluster_config (google.cloud.dataproc_v1.types.GkeClusterConfig):
578
+ Required. The configuration for running the
579
+ Dataproc cluster on GKE.
580
+
581
+ This field is a member of `oneof`_ ``config``.
582
+ kubernetes_software_config (google.cloud.dataproc_v1.types.KubernetesSoftwareConfig):
583
+ Optional. The software configuration for this
584
+ Dataproc cluster running on Kubernetes.
585
+ """
586
+
587
+ kubernetes_namespace: str = proto.Field(
588
+ proto.STRING,
589
+ number=1,
590
+ )
591
+ gke_cluster_config: "GkeClusterConfig" = proto.Field(
592
+ proto.MESSAGE,
593
+ number=2,
594
+ oneof="config",
595
+ message="GkeClusterConfig",
596
+ )
597
+ kubernetes_software_config: "KubernetesSoftwareConfig" = proto.Field(
598
+ proto.MESSAGE,
599
+ number=3,
600
+ message="KubernetesSoftwareConfig",
601
+ )
602
+
603
+
604
+ class KubernetesSoftwareConfig(proto.Message):
605
+ r"""The software configuration for this Dataproc cluster running
606
+ on Kubernetes.
607
+
608
+ Attributes:
609
+ component_version (MutableMapping[str, str]):
610
+ The components that should be installed in
611
+ this Dataproc cluster. The key must be a string
612
+ from the KubernetesComponent enumeration. The
613
+ value is the version of the software to be
614
+ installed.
615
+ At least one entry must be specified.
616
+ properties (MutableMapping[str, str]):
617
+ The properties to set on daemon config files.
618
+
619
+ Property keys are specified in ``prefix:property`` format,
620
+ for example ``spark:spark.kubernetes.container.image``. The
621
+ following are supported prefixes and their mappings:
622
+
623
+ - spark: ``spark-defaults.conf``
624
+
625
+ For more information, see `Cluster
626
+ properties <https://cloud.google.com/dataproc/docs/concepts/cluster-properties>`__.
627
+ """
628
+
629
+ component_version: MutableMapping[str, str] = proto.MapField(
630
+ proto.STRING,
631
+ proto.STRING,
632
+ number=1,
633
+ )
634
+ properties: MutableMapping[str, str] = proto.MapField(
635
+ proto.STRING,
636
+ proto.STRING,
637
+ number=2,
638
+ )
639
+
640
+
641
+ class GkeNodePoolTarget(proto.Message):
642
+ r"""GKE node pools that Dataproc workloads run on.
643
+
644
+ Attributes:
645
+ node_pool (str):
646
+ Required. The target GKE node pool. Format:
647
+ 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}'
648
+ roles (MutableSequence[google.cloud.dataproc_v1.types.GkeNodePoolTarget.Role]):
649
+ Required. The roles associated with the GKE
650
+ node pool.
651
+ node_pool_config (google.cloud.dataproc_v1.types.GkeNodePoolConfig):
652
+ Input only. The configuration for the GKE
653
+ node pool.
654
+ If specified, Dataproc attempts to create a node
655
+ pool with the specified shape. If one with the
656
+ same name already exists, it is verified against
657
+ all specified fields. If a field differs, the
658
+ virtual cluster creation will fail.
659
+
660
+ If omitted, any node pool with the specified
661
+ name is used. If a node pool with the specified
662
+ name does not exist, Dataproc create a node pool
663
+ with default values.
664
+
665
+ This is an input only field. It will not be
666
+ returned by the API.
667
+ """
668
+
669
+ class Role(proto.Enum):
670
+ r"""``Role`` specifies the tasks that will run on the node pool. Roles
671
+ can be specific to workloads. Exactly one
672
+ [GkeNodePoolTarget][google.cloud.dataproc.v1.GkeNodePoolTarget]
673
+ within the virtual cluster must have the ``DEFAULT`` role, which is
674
+ used to run all workloads that are not associated with a node pool.
675
+
676
+ Values:
677
+ ROLE_UNSPECIFIED (0):
678
+ Role is unspecified.
679
+ DEFAULT (1):
680
+ At least one node pool must have the ``DEFAULT`` role. Work
681
+ assigned to a role that is not associated with a node pool
682
+ is assigned to the node pool with the ``DEFAULT`` role. For
683
+ example, work assigned to the ``CONTROLLER`` role will be
684
+ assigned to the node pool with the ``DEFAULT`` role if no
685
+ node pool has the ``CONTROLLER`` role.
686
+ CONTROLLER (2):
687
+ Run work associated with the Dataproc control
688
+ plane (for example, controllers and webhooks).
689
+ Very low resource requirements.
690
+ SPARK_DRIVER (3):
691
+ Run work associated with a Spark driver of a
692
+ job.
693
+ SPARK_EXECUTOR (4):
694
+ Run work associated with a Spark executor of
695
+ a job.
696
+ """
697
+ ROLE_UNSPECIFIED = 0
698
+ DEFAULT = 1
699
+ CONTROLLER = 2
700
+ SPARK_DRIVER = 3
701
+ SPARK_EXECUTOR = 4
702
+
703
+ node_pool: str = proto.Field(
704
+ proto.STRING,
705
+ number=1,
706
+ )
707
+ roles: MutableSequence[Role] = proto.RepeatedField(
708
+ proto.ENUM,
709
+ number=2,
710
+ enum=Role,
711
+ )
712
+ node_pool_config: "GkeNodePoolConfig" = proto.Field(
713
+ proto.MESSAGE,
714
+ number=3,
715
+ message="GkeNodePoolConfig",
716
+ )
717
+
718
+
719
+ class GkeNodePoolConfig(proto.Message):
720
+ r"""The configuration of a GKE node pool used by a `Dataproc-on-GKE
721
+ cluster <https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster>`__.
722
+
723
+ Attributes:
724
+ config (google.cloud.dataproc_v1.types.GkeNodePoolConfig.GkeNodeConfig):
725
+ Optional. The node pool configuration.
726
+ locations (MutableSequence[str]):
727
+ Optional. The list of Compute Engine
728
+ `zones <https://cloud.google.com/compute/docs/zones#available>`__
729
+ where node pool nodes associated with a Dataproc on GKE
730
+ virtual cluster will be located.
731
+
732
+ **Note:** All node pools associated with a virtual cluster
733
+ must be located in the same region as the virtual cluster,
734
+ and they must be located in the same zone within that
735
+ region.
736
+
737
+ If a location is not specified during node pool creation,
738
+ Dataproc on GKE will choose the zone.
739
+ autoscaling (google.cloud.dataproc_v1.types.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig):
740
+ Optional. The autoscaler configuration for
741
+ this node pool. The autoscaler is enabled only
742
+ when a valid configuration is present.
743
+ """
744
+
745
+ class GkeNodeConfig(proto.Message):
746
+ r"""Parameters that describe cluster nodes.
747
+
748
+ Attributes:
749
+ machine_type (str):
750
+ Optional. The name of a Compute Engine `machine
751
+ type <https://cloud.google.com/compute/docs/machine-types>`__.
752
+ local_ssd_count (int):
753
+ Optional. The number of local SSD disks to attach to the
754
+ node, which is limited by the maximum number of disks
755
+ allowable per zone (see `Adding Local
756
+ SSDs <https://cloud.google.com/compute/docs/disks/local-ssd>`__).
757
+ preemptible (bool):
758
+ Optional. Whether the nodes are created as legacy
759
+ [preemptible VM instances]
760
+ (https://cloud.google.com/compute/docs/instances/preemptible).
761
+ Also see
762
+ [Spot][google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.spot]
763
+ VMs, preemptible VM instances without a maximum lifetime.
764
+ Legacy and Spot preemptible nodes cannot be used in a node
765
+ pool with the ``CONTROLLER`` [role]
766
+ (/dataproc/docs/reference/rest/v1/projects.regions.clusters#role)
767
+ or in the DEFAULT node pool if the CONTROLLER role is not
768
+ assigned (the DEFAULT node pool will assume the CONTROLLER
769
+ role).
770
+ accelerators (MutableSequence[google.cloud.dataproc_v1.types.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig]):
771
+ Optional. A list of `hardware
772
+ accelerators <https://cloud.google.com/compute/docs/gpus>`__
773
+ to attach to each node.
774
+ min_cpu_platform (str):
775
+ Optional. `Minimum CPU
776
+ platform <https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform>`__
777
+ to be used by this instance. The instance may be scheduled
778
+ on the specified or a newer CPU platform. Specify the
779
+ friendly names of CPU platforms, such as "Intel Haswell"\`
780
+ or Intel Sandy Bridge".
781
+ boot_disk_kms_key (str):
782
+ Optional. The [Customer Managed Encryption Key (CMEK)]
783
+ (https://cloud.google.com/kubernetes-engine/docs/how-to/using-cmek)
784
+ used to encrypt the boot disk attached to each node in the
785
+ node pool. Specify the key using the following format:
786
+ projects/KEY_PROJECT_ID/locations/LOCATION/keyRings/RING_NAME/cryptoKeys/KEY_NAME.
787
+ spot (bool):
788
+ Optional. Whether the nodes are created as [Spot VM
789
+ instances]
790
+ (https://cloud.google.com/compute/docs/instances/spot). Spot
791
+ VMs are the latest update to legacy [preemptible
792
+ VMs][google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.preemptible].
793
+ Spot VMs do not have a maximum lifetime. Legacy and Spot
794
+ preemptible nodes cannot be used in a node pool with the
795
+ ``CONTROLLER``
796
+ `role </dataproc/docs/reference/rest/v1/projects.regions.clusters#role>`__
797
+ or in the DEFAULT node pool if the CONTROLLER role is not
798
+ assigned (the DEFAULT node pool will assume the CONTROLLER
799
+ role).
800
+ """
801
+
802
+ machine_type: str = proto.Field(
803
+ proto.STRING,
804
+ number=1,
805
+ )
806
+ local_ssd_count: int = proto.Field(
807
+ proto.INT32,
808
+ number=7,
809
+ )
810
+ preemptible: bool = proto.Field(
811
+ proto.BOOL,
812
+ number=10,
813
+ )
814
+ accelerators: MutableSequence[
815
+ "GkeNodePoolConfig.GkeNodePoolAcceleratorConfig"
816
+ ] = proto.RepeatedField(
817
+ proto.MESSAGE,
818
+ number=11,
819
+ message="GkeNodePoolConfig.GkeNodePoolAcceleratorConfig",
820
+ )
821
+ min_cpu_platform: str = proto.Field(
822
+ proto.STRING,
823
+ number=13,
824
+ )
825
+ boot_disk_kms_key: str = proto.Field(
826
+ proto.STRING,
827
+ number=23,
828
+ )
829
+ spot: bool = proto.Field(
830
+ proto.BOOL,
831
+ number=32,
832
+ )
833
+
834
+ class GkeNodePoolAcceleratorConfig(proto.Message):
835
+ r"""A GkeNodeConfigAcceleratorConfig represents a Hardware
836
+ Accelerator request for a node pool.
837
+
838
+ Attributes:
839
+ accelerator_count (int):
840
+ The number of accelerator cards exposed to an
841
+ instance.
842
+ accelerator_type (str):
843
+ The accelerator type resource namename (see
844
+ GPUs on Compute Engine).
845
+ gpu_partition_size (str):
846
+ Size of partitions to create on the GPU. Valid values are
847
+ described in the NVIDIA `mig user
848
+ guide <https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning>`__.
849
+ """
850
+
851
+ accelerator_count: int = proto.Field(
852
+ proto.INT64,
853
+ number=1,
854
+ )
855
+ accelerator_type: str = proto.Field(
856
+ proto.STRING,
857
+ number=2,
858
+ )
859
+ gpu_partition_size: str = proto.Field(
860
+ proto.STRING,
861
+ number=3,
862
+ )
863
+
864
+ class GkeNodePoolAutoscalingConfig(proto.Message):
865
+ r"""GkeNodePoolAutoscaling contains information the cluster
866
+ autoscaler needs to adjust the size of the node pool to the
867
+ current cluster usage.
868
+
869
+ Attributes:
870
+ min_node_count (int):
871
+ The minimum number of nodes in the node pool. Must be >= 0
872
+ and <= max_node_count.
873
+ max_node_count (int):
874
+ The maximum number of nodes in the node pool. Must be >=
875
+ min_node_count, and must be > 0. **Note:** Quota must be
876
+ sufficient to scale up the cluster.
877
+ """
878
+
879
+ min_node_count: int = proto.Field(
880
+ proto.INT32,
881
+ number=2,
882
+ )
883
+ max_node_count: int = proto.Field(
884
+ proto.INT32,
885
+ number=3,
886
+ )
887
+
888
+ config: GkeNodeConfig = proto.Field(
889
+ proto.MESSAGE,
890
+ number=2,
891
+ message=GkeNodeConfig,
892
+ )
893
+ locations: MutableSequence[str] = proto.RepeatedField(
894
+ proto.STRING,
895
+ number=13,
896
+ )
897
+ autoscaling: GkeNodePoolAutoscalingConfig = proto.Field(
898
+ proto.MESSAGE,
899
+ number=4,
900
+ message=GkeNodePoolAutoscalingConfig,
901
+ )
902
+
903
+
904
+ class AuthenticationConfig(proto.Message):
905
+ r"""Authentication configuration for a workload is used to set
906
+ the default identity for the workload execution.
907
+ The config specifies the type of identity (service account or
908
+ user) that will be used by workloads to access resources on the
909
+ project(s).
910
+
911
+ Attributes:
912
+ user_workload_authentication_type (google.cloud.dataproc_v1.types.AuthenticationConfig.AuthenticationType):
913
+ Optional. Authentication type for the user
914
+ workload running in containers.
915
+ """
916
+
917
+ class AuthenticationType(proto.Enum):
918
+ r"""Authentication types for workload execution.
919
+
920
+ Values:
921
+ AUTHENTICATION_TYPE_UNSPECIFIED (0):
922
+ If AuthenticationType is unspecified then
923
+ END_USER_CREDENTIALS is used for 3.0 and newer runtimes, and
924
+ SERVICE_ACCOUNT is used for older runtimes.
925
+ SERVICE_ACCOUNT (1):
926
+ Use service account credentials for
927
+ authenticating to other services.
928
+ END_USER_CREDENTIALS (2):
929
+ Use OAuth credentials associated with the
930
+ workload creator/user for authenticating to
931
+ other services.
932
+ """
933
+ AUTHENTICATION_TYPE_UNSPECIFIED = 0
934
+ SERVICE_ACCOUNT = 1
935
+ END_USER_CREDENTIALS = 2
936
+
937
+ user_workload_authentication_type: AuthenticationType = proto.Field(
938
+ proto.ENUM,
939
+ number=1,
940
+ enum=AuthenticationType,
941
+ )
942
+
943
+
944
+ class AutotuningConfig(proto.Message):
945
+ r"""Autotuning configuration of the workload.
946
+
947
+ Attributes:
948
+ scenarios (MutableSequence[google.cloud.dataproc_v1.types.AutotuningConfig.Scenario]):
949
+ Optional. Scenarios for which tunings are
950
+ applied.
951
+ """
952
+
953
+ class Scenario(proto.Enum):
954
+ r"""Scenario represents a specific goal that autotuning will
955
+ attempt to achieve by modifying workloads.
956
+
957
+ Values:
958
+ SCENARIO_UNSPECIFIED (0):
959
+ Default value.
960
+ SCALING (2):
961
+ Scaling recommendations such as
962
+ initialExecutors.
963
+ BROADCAST_HASH_JOIN (3):
964
+ Adding hints for potential relation
965
+ broadcasts.
966
+ MEMORY (4):
967
+ Memory management for workloads.
968
+ """
969
+ SCENARIO_UNSPECIFIED = 0
970
+ SCALING = 2
971
+ BROADCAST_HASH_JOIN = 3
972
+ MEMORY = 4
973
+
974
+ scenarios: MutableSequence[Scenario] = proto.RepeatedField(
975
+ proto.ENUM,
976
+ number=2,
977
+ enum=Scenario,
978
+ )
979
+
980
+
981
+ class RepositoryConfig(proto.Message):
982
+ r"""Configuration for dependency repositories
983
+
984
+ Attributes:
985
+ pypi_repository_config (google.cloud.dataproc_v1.types.PyPiRepositoryConfig):
986
+ Optional. Configuration for PyPi repository.
987
+ """
988
+
989
+ pypi_repository_config: "PyPiRepositoryConfig" = proto.Field(
990
+ proto.MESSAGE,
991
+ number=1,
992
+ message="PyPiRepositoryConfig",
993
+ )
994
+
995
+
996
+ class PyPiRepositoryConfig(proto.Message):
997
+ r"""Configuration for PyPi repository
998
+
999
+ Attributes:
1000
+ pypi_repository (str):
1001
+ Optional. PyPi repository address
1002
+ """
1003
+
1004
+ pypi_repository: str = proto.Field(
1005
+ proto.STRING,
1006
+ number=1,
1007
+ )
1008
+
1009
+
1010
+ __all__ = tuple(sorted(__protobuf__.manifest))