Skip to content

Commit 2db75e6

Browse files
Google APIscopybara-github
authored andcommitted
feat: add support for Cloud Resource Manager tags for Dataproc Serverless workloads
docs: A comment for method `DeleteBatch` in service `BatchController` is changed docs: A comment for field `request_id` in message `.google.cloud.dataproc.v1.CreateBatchRequest` is changed docs: A comment for field `filter` in message `.google.cloud.dataproc.v1.ListBatchesRequest` is changed docs: A comment for field `batches` in message `.google.cloud.dataproc.v1.ListBatchesResponse` is changed docs: A comment for field `name` in message `.google.cloud.dataproc.v1.SessionTemplate` is changed docs: A comment for field `spark_connect_session` in message `.google.cloud.dataproc.v1.SessionTemplate` is changed docs: A comment for field `name` in message `.google.cloud.dataproc.v1.Session` is changed docs: A comment for field `spark_connect_session` in message `.google.cloud.dataproc.v1.Session` is changed docs: A comment for message `SparkConnectConfig` is changed docs: A comment for field `cohort` in message `.google.cloud.dataproc.v1.RuntimeConfig` is changed docs: A comment for field `milli_accelerator_seconds` in message `.google.cloud.dataproc.v1.UsageMetrics` is changed docs: A comment for field `accelerator_type` in message `.google.cloud.dataproc.v1.UsageMetrics` is changed docs: A comment for field `boot_disk_kms_key` in message `.google.cloud.dataproc.v1.GkeNodePoolConfig` is changed docs: A comment for field `pypi_repository` in message `.google.cloud.dataproc.v1.PyPiRepositoryConfig` is changed PiperOrigin-RevId: 911509116
1 parent 3593126 commit 2db75e6

4 files changed

Lines changed: 72 additions & 35 deletions

File tree

google/cloud/dataproc/v1/batches.proto

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ option java_package = "com.google.cloud.dataproc.v1";
3434
service BatchController {
3535
option (google.api.default_host) = "dataproc.googleapis.com";
3636
option (google.api.oauth_scopes) =
37-
"https://www.googleapis.com/auth/cloud-platform";
37+
"https://www.googleapis.com/auth/cloud-platform,"
38+
"https://www.googleapis.com/auth/dataproc,"
39+
"https://www.googleapis.com/auth/dataproc.read-only";
3840

3941
// Creates a batch workload that executes asynchronously.
4042
rpc CreateBatch(CreateBatchRequest) returns (google.longrunning.Operation) {
@@ -65,8 +67,10 @@ service BatchController {
6567
option (google.api.method_signature) = "parent";
6668
}
6769

68-
// Deletes the batch workload resource. If the batch is not in terminal state,
69-
// the delete fails and the response returns `FAILED_PRECONDITION`.
70+
// Deletes the batch workload resource. If the batch is not in a
71+
// `CANCELLED`, `SUCCEEDED` or `FAILED`
72+
// [`State`][google.cloud.dataproc.v1.Batch.State], the delete operation fails
73+
// and the response returns `FAILED_PRECONDITION`.
7074
rpc DeleteBatch(DeleteBatchRequest) returns (google.protobuf.Empty) {
7175
option (google.api.http) = {
7276
delete: "/v1/{name=projects/*/locations/*/batches/*}"
@@ -96,10 +100,9 @@ message CreateBatchRequest {
96100

97101
// Optional. A unique ID used to identify the request. If the service
98102
// receives two
99-
// [CreateBatchRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateBatchRequest)s
100-
// with the same request_id, the second request is ignored and the
101-
// Operation that corresponds to the first Batch created and stored
102-
// in the backend is returned.
103+
// `CreateBatchRequests` with the same `request_id`, the second request is
104+
// ignored and the operation that corresponds to the first Batch created and
105+
// stored in the backend is returned.
103106
//
104107
// Recommendation: Set this value to a
105108
// [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
@@ -144,10 +147,13 @@ message ListBatchesRequest {
144147
// A filter is a logical expression constraining the values of various fields
145148
// in each batch resource. Filters are case sensitive, and may contain
146149
// multiple clauses combined with logical operators (AND/OR).
147-
// Supported fields are `batch_id`, `batch_uuid`, `state`, and `create_time`.
150+
// Supported fields are `batch_id`, `batch_uuid`, `state`, `create_time`, and
151+
// `labels`.
148152
//
149153
// e.g. `state = RUNNING and create_time < "2023-01-01T00:00:00Z"`
150-
// filters for batches in state RUNNING that were created before 2023-01-01
154+
// filters for batches in state RUNNING that were created before 2023-01-01.
155+
// `state = RUNNING and labels.environment=production` filters for batches in
156+
// state in a RUNNING state that have a production environment label.
151157
//
152158
// See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed
153159
// description of the filter syntax and a list of supported comparisons.
@@ -164,8 +170,8 @@ message ListBatchesRequest {
164170

165171
// A list of batch workloads.
166172
message ListBatchesResponse {
167-
// The batches from the specified collection.
168-
repeated Batch batches = 1;
173+
// Output only. The batches from the specified collection.
174+
repeated Batch batches = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
169175

170176
// A token, which can be sent as `page_token` to retrieve the next page.
171177
// If this field is omitted, there are no subsequent pages.

google/cloud/dataproc/v1/session_templates.proto

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -34,7 +34,9 @@ option java_package = "com.google.cloud.dataproc.v1";
3434
service SessionTemplateController {
3535
option (google.api.default_host) = "dataproc.googleapis.com";
3636
option (google.api.oauth_scopes) =
37-
"https://www.googleapis.com/auth/cloud-platform";
37+
"https://www.googleapis.com/auth/cloud-platform,"
38+
"https://www.googleapis.com/auth/dataproc,"
39+
"https://www.googleapis.com/auth/dataproc.read-only";
3840

3941
// Create a session template synchronously.
4042
rpc CreateSessionTemplate(CreateSessionTemplateRequest)
@@ -168,8 +170,11 @@ message SessionTemplate {
168170
pattern: "projects/{project}/locations/{location}/sessionTemplates/{template}"
169171
};
170172

171-
// Required. The resource name of the session template.
172-
string name = 1 [(google.api.field_behavior) = REQUIRED];
173+
// Required. Identifier. The resource name of the session template.
174+
string name = 1 [
175+
(google.api.field_behavior) = REQUIRED,
176+
(google.api.field_behavior) = IDENTIFIER
177+
];
173178

174179
// Optional. Brief description of the template.
175180
string description = 9 [(google.api.field_behavior) = OPTIONAL];
@@ -183,7 +188,7 @@ message SessionTemplate {
183188
// Optional. Jupyter session config.
184189
JupyterConfig jupyter_session = 3 [(google.api.field_behavior) = OPTIONAL];
185190

186-
// Optional. Spark Connect session config.
191+
// Optional. Spark connect session config.
187192
SparkConnectConfig spark_connect_session = 11
188193
[(google.api.field_behavior) = OPTIONAL];
189194
}

google/cloud/dataproc/v1/sessions.proto

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -33,7 +33,9 @@ option java_package = "com.google.cloud.dataproc.v1";
3333
service SessionController {
3434
option (google.api.default_host) = "dataproc.googleapis.com";
3535
option (google.api.oauth_scopes) =
36-
"https://www.googleapis.com/auth/cloud-platform";
36+
"https://www.googleapis.com/auth/cloud-platform,"
37+
"https://www.googleapis.com/auth/dataproc,"
38+
"https://www.googleapis.com/auth/dataproc.read-only";
3739

3840
// Create an interactive session asynchronously.
3941
rpc CreateSession(CreateSessionRequest)
@@ -275,8 +277,8 @@ message Session {
275277
[(google.api.field_behavior) = OUTPUT_ONLY];
276278
}
277279

278-
// Required. The resource name of the session.
279-
string name = 1 [(google.api.field_behavior) = REQUIRED];
280+
// Identifier. The resource name of the session.
281+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
280282

281283
// Output only. A session UUID (Unique Universal Identifier). The service
282284
// generates this value when it creates the session.
@@ -291,7 +293,7 @@ message Session {
291293
// Optional. Jupyter session config.
292294
JupyterConfig jupyter_session = 4 [(google.api.field_behavior) = OPTIONAL];
293295

294-
// Optional. Spark Connect session config.
296+
// Optional. Spark connect session config.
295297
SparkConnectConfig spark_connect_session = 17
296298
[(google.api.field_behavior) = OPTIONAL];
297299
}
@@ -375,5 +377,5 @@ message JupyterConfig {
375377
string display_name = 2 [(google.api.field_behavior) = OPTIONAL];
376378
}
377379

378-
// Spark Connect configuration for an interactive session.
380+
// Spark connect configuration for an interactive session.
379381
message SparkConnectConfig {}

google/cloud/dataproc/v1/shared.proto

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -59,8 +59,8 @@ message RuntimeConfig {
5959
AutotuningConfig autotuning_config = 6
6060
[(google.api.field_behavior) = OPTIONAL];
6161

62-
// Optional. Cohort identifier. Identifies families of the workloads having
63-
// the same shape, e.g. daily ETL jobs.
62+
// Optional. Cohort identifier. Identifies families of the workloads that have
63+
// the same shape, for example, daily ETL jobs.
6464
string cohort = 7 [(google.api.field_behavior) = OPTIONAL];
6565
}
6666

@@ -92,7 +92,12 @@ message ExecutionConfig {
9292
repeated string network_tags = 6 [(google.api.field_behavior) = OPTIONAL];
9393

9494
// Optional. The Cloud KMS key to use for encryption.
95-
string kms_key = 7 [(google.api.field_behavior) = OPTIONAL];
95+
string kms_key = 7 [
96+
(google.api.field_behavior) = OPTIONAL,
97+
(google.api.resource_reference) = {
98+
type: "cloudkms.googleapis.com/CryptoKey"
99+
}
100+
];
96101

97102
// Optional. Applies to sessions only. The duration to keep the session alive
98103
// while it's idling. Exceeding this threshold causes the session to
@@ -139,6 +144,15 @@ message ExecutionConfig {
139144
// resources on the project(s).
140145
AuthenticationConfig authentication_config = 11
141146
[(google.api.field_behavior) = OPTIONAL];
147+
148+
// Optional. Associates Resource Manager tags with the workload nodes.
149+
// There is a max limit of 30 tags.
150+
// Keys and values can be either in numeric format, such as
151+
// `tagKeys/{tag_key_id}` and `tagValues/{tag_value_id}`, or in namespaced
152+
// format, such as `{org_id|project_id}/{tag_key_short_name}` and
153+
// `{tag_value_short_name}`.
154+
map<string, string> resource_manager_tags = 12
155+
[(google.api.field_behavior) = OPTIONAL];
142156
}
143157

144158
// Spark History Server configuration for the workload.
@@ -214,13 +228,17 @@ message UsageMetrics {
214228
// (https://cloud.google.com/dataproc-serverless/pricing)).
215229
int64 shuffle_storage_gb_seconds = 2 [(google.api.field_behavior) = OPTIONAL];
216230

217-
// Optional. Accelerator usage in (`milliAccelerator` x `seconds`) (see
218-
// [Dataproc Serverless pricing]
231+
// Optional. [DEPRECATED] Accelerator usage in (`milliAccelerator` x
232+
// `seconds`) (see [Dataproc Serverless pricing]
219233
// (https://cloud.google.com/dataproc-serverless/pricing)).
220234
int64 milli_accelerator_seconds = 3 [(google.api.field_behavior) = OPTIONAL];
221235

222-
// Optional. Accelerator type being used, if any
236+
// Optional. [DEPRECATED] Accelerator type being used, if any
223237
string accelerator_type = 4 [(google.api.field_behavior) = OPTIONAL];
238+
239+
// Optional. The timestamp of the usage metrics.
240+
google.protobuf.Timestamp update_time = 6
241+
[(google.api.field_behavior) = OPTIONAL];
224242
}
225243

226244
// The usage snapshot represents the resources consumed by a workload at a
@@ -417,8 +435,13 @@ message GkeNodePoolConfig {
417435
// (https://cloud.google.com/kubernetes-engine/docs/how-to/using-cmek)
418436
// used to encrypt the boot disk attached to each node in the node pool.
419437
// Specify the key using the following format:
420-
// <code>projects/<var>KEY_PROJECT_ID</var>/locations/<var>LOCATION</var>/keyRings/<var>RING_NAME</var>/cryptoKeys/<var>KEY_NAME</var></code>.
421-
string boot_disk_kms_key = 23 [(google.api.field_behavior) = OPTIONAL];
438+
// `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`
439+
string boot_disk_kms_key = 23 [
440+
(google.api.field_behavior) = OPTIONAL,
441+
(google.api.resource_reference) = {
442+
type: "cloudkms.googleapis.com/CryptoKey"
443+
}
444+
];
422445

423446
// Optional. Whether the nodes are created as [Spot VM instances]
424447
// (https://cloud.google.com/compute/docs/instances/spot).
@@ -545,7 +568,8 @@ message RepositoryConfig {
545568

546569
// Configuration for PyPi repository
547570
message PyPiRepositoryConfig {
548-
// Optional. PyPi repository address
571+
// Optional. The PyPi repository address. **Note: This field is not available
572+
// for batch workloads.**
549573
string pypi_repository = 1 [(google.api.field_behavior) = OPTIONAL];
550574
}
551575

@@ -588,9 +612,6 @@ enum Component {
588612
// The Jupyter Notebook.
589613
JUPYTER = 1;
590614

591-
// The Jupyter Kernel Gateway.
592-
JUPYTER_KERNEL_GATEWAY = 22;
593-
594615
// The Pig component.
595616
PIG = 21;
596617

@@ -611,6 +632,9 @@ enum Component {
611632

612633
// The Zookeeper service.
613634
ZOOKEEPER = 8;
635+
636+
// The Jupyter Kernel Gateway.
637+
JUPYTER_KERNEL_GATEWAY = 22;
614638
}
615639

616640
// Actions in response to failure of a resource associated with a cluster.

0 commit comments

Comments
 (0)