Skip to content

Commit a7ee03d

Browse files
Google APIscopybara-github
authored andcommitted
feat: add Notebooks Runtime Software Configuration
docs: A comment for field `filter` in message `.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest` is changed docs: A comment for field `filter` in message `.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest` is changed PiperOrigin-RevId: 724420184
1 parent 7dd0554 commit a7ee03d

4 files changed

Lines changed: 106 additions & 89 deletions

File tree

‎google/cloud/aiplatform/v1beta1/BUILD.bazel‎

Lines changed: 15 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
11
# This file was generated and then heavily edited by hand. Be careful not
22
# to rollback, undo, or overwrite any of the manual changes.
33

4-
# This is an API workspace, having public visibility by default makes perfect sense.
5-
package(default_visibility = ["//visibility:public"])
4+
load("@com_google_googleapis_imports//:imports.bzl", "csharp_gapic_assembly_pkg", "csharp_gapic_library", "csharp_grpc_library", "csharp_proto_library", "go_gapic_assembly_pkg", "go_gapic_library", "go_proto_library", "java_gapic_assembly_gradle_pkg", "java_gapic_library", "java_gapic_test", "java_grpc_library", "java_proto_library", "nodejs_gapic_assembly_pkg", "nodejs_gapic_library", "php_gapic_assembly_pkg", "php_gapic_library", "php_proto_library", "proto_library_with_info", "py_gapic_assembly_pkg", "py_gapic_library", "py_test", "ruby_cloud_gapic_library", "ruby_gapic_assembly_pkg", "ruby_grpc_library", "ruby_proto_library")
5+
6+
##############################################################################
7+
# C++
8+
##############################################################################
9+
# buildifier: disable=same-origin-load
10+
load(
11+
"@com_google_googleapis_imports//:imports.bzl",
12+
"cc_grpc_library",
13+
"cc_proto_library",
14+
)
615

716
##############################################################################
817
# Common
918
##############################################################################
1019
load("@rules_proto//proto:defs.bzl", "proto_library")
11-
load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
20+
21+
# This is an API workspace, having public visibility by default makes perfect sense.
22+
package(default_visibility = ["//visibility:public"])
1223

1324
_PROTO_SUBPACKAGE_DEPS = [
1425
"//google/cloud/aiplatform/v1beta1/schema:schema_proto",
@@ -112,6 +123,7 @@ proto_library(
112123
"notebook_runtime.proto",
113124
"notebook_runtime_template_ref.proto",
114125
"notebook_service.proto",
126+
"notebook_software_config.proto",
115127
"openapi.proto",
116128
"operation.proto",
117129
"persistent_resource.proto",
@@ -183,18 +195,6 @@ proto_library_with_info(
183195
] + _PROTO_SUBPACKAGE_DEPS,
184196
)
185197

186-
##############################################################################
187-
# Java
188-
##############################################################################
189-
load(
190-
"@com_google_googleapis_imports//:imports.bzl",
191-
"java_gapic_assembly_gradle_pkg",
192-
"java_gapic_library",
193-
"java_gapic_test",
194-
"java_grpc_library",
195-
"java_proto_library",
196-
)
197-
198198
_JAVA_PROTO_SUBPACKAGE_DEPS = [
199199
"//google/cloud/aiplatform/v1beta1/schema/predict/instance:instance_java_proto",
200200
"//google/cloud/aiplatform/v1beta1/schema/predict/params:params_java_proto",
@@ -296,16 +296,6 @@ java_gapic_assembly_gradle_pkg(
296296
] + _JAVA_PROTO_SUBPACKAGE_DEPS + _PROTO_SUBPACKAGE_DEPS + _JAVA_GRPC_SUBPACKAGE_DEPS,
297297
)
298298

299-
##############################################################################
300-
# Go
301-
##############################################################################
302-
load(
303-
"@com_google_googleapis_imports//:imports.bzl",
304-
"go_gapic_assembly_pkg",
305-
"go_gapic_library",
306-
"go_proto_library",
307-
)
308-
309299
go_proto_library(
310300
name = "aiplatform_go_proto",
311301
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
@@ -358,16 +348,6 @@ go_gapic_assembly_pkg(
358348
],
359349
)
360350

361-
##############################################################################
362-
# Python
363-
##############################################################################
364-
load(
365-
"@com_google_googleapis_imports//:imports.bzl",
366-
"py_gapic_assembly_pkg",
367-
"py_gapic_library",
368-
"py_test",
369-
)
370-
371351
_PY_GAPIC_SUBPACKAGE_DEPS = [
372352
"//google/cloud/aiplatform/v1beta1/schema/predict/instance:instance_py_gapic",
373353
"//google/cloud/aiplatform/v1beta1/schema/predict/params:params_py_gapic",
@@ -405,16 +385,6 @@ py_gapic_assembly_pkg(
405385
] + _PROTO_SUBPACKAGE_DEPS + _PY_GAPIC_SUBPACKAGE_DEPS,
406386
)
407387

408-
##############################################################################
409-
# PHP
410-
##############################################################################
411-
load(
412-
"@com_google_googleapis_imports//:imports.bzl",
413-
"php_gapic_assembly_pkg",
414-
"php_gapic_library",
415-
"php_proto_library",
416-
)
417-
418388
php_proto_library(
419389
name = "aiplatform_php_proto",
420390
deps = [":aiplatform_proto"],
@@ -439,15 +409,6 @@ php_gapic_assembly_pkg(
439409
],
440410
)
441411

442-
##############################################################################
443-
# Node.js
444-
##############################################################################
445-
load(
446-
"@com_google_googleapis_imports//:imports.bzl",
447-
"nodejs_gapic_assembly_pkg",
448-
"nodejs_gapic_library",
449-
)
450-
451412
nodejs_gapic_library(
452413
name = "aiplatform_nodejs_gapic",
453414
package_name = "@google-cloud/aiplatform",
@@ -469,17 +430,6 @@ nodejs_gapic_assembly_pkg(
469430
] + _PROTO_SUBPACKAGE_DEPS,
470431
)
471432

472-
##############################################################################
473-
# Ruby
474-
##############################################################################
475-
load(
476-
"@com_google_googleapis_imports//:imports.bzl",
477-
"ruby_cloud_gapic_library",
478-
"ruby_gapic_assembly_pkg",
479-
"ruby_grpc_library",
480-
"ruby_proto_library",
481-
)
482-
483433
ruby_proto_library(
484434
name = "aiplatform_ruby_proto",
485435
deps = [":aiplatform_proto"],
@@ -515,17 +465,6 @@ ruby_gapic_assembly_pkg(
515465
],
516466
)
517467

518-
##############################################################################
519-
# C#
520-
##############################################################################
521-
load(
522-
"@com_google_googleapis_imports//:imports.bzl",
523-
"csharp_gapic_assembly_pkg",
524-
"csharp_gapic_library",
525-
"csharp_grpc_library",
526-
"csharp_proto_library",
527-
)
528-
529468
csharp_proto_library(
530469
name = "aiplatform_csharp_proto",
531470
extra_opts = [],
@@ -562,16 +501,6 @@ csharp_gapic_assembly_pkg(
562501
],
563502
)
564503

565-
##############################################################################
566-
# C++
567-
##############################################################################
568-
# buildifier: disable=same-origin-load
569-
load(
570-
"@com_google_googleapis_imports//:imports.bzl",
571-
"cc_grpc_library",
572-
"cc_proto_library",
573-
)
574-
575504
cc_proto_library(
576505
name = "aiplatform_cc_proto",
577506
deps = [":aiplatform_proto"],

‎google/cloud/aiplatform/v1beta1/notebook_runtime.proto‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import "google/cloud/aiplatform/v1beta1/network_spec.proto";
2424
import "google/cloud/aiplatform/v1beta1/notebook_euc_config.proto";
2525
import "google/cloud/aiplatform/v1beta1/notebook_idle_shutdown_config.proto";
2626
import "google/cloud/aiplatform/v1beta1/notebook_runtime_template_ref.proto";
27+
import "google/cloud/aiplatform/v1beta1/notebook_software_config.proto";
2728
import "google/protobuf/timestamp.proto";
2829

2930
option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
@@ -156,6 +157,10 @@ message NotebookRuntimeTemplate {
156157

157158
// Customer-managed encryption key spec for the notebook runtime.
158159
EncryptionSpec encryption_spec = 23;
160+
161+
// Optional. The notebook software configuration of the notebook runtime.
162+
NotebookSoftwareConfig software_config = 24
163+
[(google.api.field_behavior) = OPTIONAL];
159164
}
160165

161166
// A runtime is a virtual machine allocated to a particular user for a
@@ -321,6 +326,10 @@ message NotebookRuntime {
321326
// instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
322327
repeated string network_tags = 25 [(google.api.field_behavior) = OPTIONAL];
323328

329+
// Output only. Software config of the notebook runtime.
330+
NotebookSoftwareConfig software_config = 31
331+
[(google.api.field_behavior) = OUTPUT_ONLY];
332+
324333
// Output only. Customer-managed encryption key spec for the notebook runtime.
325334
EncryptionSpec encryption_spec = 28
326335
[(google.api.field_behavior) = OUTPUT_ONLY];

‎google/cloud/aiplatform/v1beta1/notebook_service.proto‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,13 +314,17 @@ message ListNotebookRuntimeTemplatesRequest {
314314
// * A key including a space must be quoted. `labels."a key"`.
315315
// * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
316316
// [USER_DEFINED, ONE_CLICK].
317+
// * `machineType` supports = and !=.
318+
// * `acceleratorType` supports = and !=.
317319
//
318320
// Some examples:
319321
//
320322
// * `notebookRuntimeTemplate=notebookRuntimeTemplate123`
321323
// * `displayName="myDisplayName"`
322324
// * `labels.myKey="myValue"`
323325
// * `notebookRuntimeType=USER_DEFINED`
326+
// * `machineType=e2-standard-4`
327+
// * `acceleratorType=NVIDIA_TESLA_T4`
324328
string filter = 2 [(google.api.field_behavior) = OPTIONAL];
325329

326330
// Optional. The standard list page size.
@@ -485,6 +489,8 @@ message ListNotebookRuntimesRequest {
485489
// UI_RESOURCE_STATE_CREATION_FAILED].
486490
// * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
487491
// [USER_DEFINED, ONE_CLICK].
492+
// * `machineType` supports = and !=.
493+
// * `acceleratorType` supports = and !=.
488494
//
489495
// Some examples:
490496
//
@@ -496,6 +502,8 @@ message ListNotebookRuntimesRequest {
496502
// * `runtimeUser="[email protected]"`
497503
// * `uiState=UI_RESOURCE_STATE_BEING_DELETED`
498504
// * `notebookRuntimeType=USER_DEFINED`
505+
// * `machineType=e2-standard-4`
506+
// * `acceleratorType=NVIDIA_TESLA_T4`
499507
string filter = 2 [(google.api.field_behavior) = OPTIONAL];
500508

501509
// Optional. The standard list page size.
@@ -713,7 +721,8 @@ message ListNotebookExecutionJobsRequest {
713721

714722
// Optional. The standard list page token.
715723
// Typically obtained via
716-
// [ListNotebookExecutionJobs.next_page_token][] of the previous
724+
// [ListNotebookExecutionJobsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNotebookExecutionJobsResponse.next_page_token]
725+
// of the previous
717726
// [NotebookService.ListNotebookExecutionJobs][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookExecutionJobs]
718727
// call.
719728
string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
@@ -738,8 +747,9 @@ message ListNotebookExecutionJobsResponse {
738747
repeated NotebookExecutionJob notebook_execution_jobs = 1;
739748

740749
// A token to retrieve next page of results.
741-
// Pass to [ListNotebookExecutionJobs.page_token][] to obtain that
742-
// page.
750+
// Pass to
751+
// [ListNotebookExecutionJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListNotebookExecutionJobsRequest.page_token]
752+
// to obtain that page.
743753
string next_page_token = 2;
744754
}
745755

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.cloud.aiplatform.v1beta1;
18+
19+
import "google/api/field_behavior.proto";
20+
import "google/cloud/aiplatform/v1beta1/env_var.proto";
21+
22+
option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
23+
option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb";
24+
option java_multiple_files = true;
25+
option java_outer_classname = "NotebookSoftwareConfigProto";
26+
option java_package = "com.google.cloud.aiplatform.v1beta1";
27+
option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1";
28+
option ruby_package = "Google::Cloud::AIPlatform::V1beta1";
29+
30+
// Post startup script config.
31+
message PostStartupScriptConfig {
32+
// Represents a notebook runtime post startup script behavior.
33+
enum PostStartupScriptBehavior {
34+
// Unspecified post startup script behavior.
35+
POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED = 0;
36+
37+
// Run post startup script after runtime is started.
38+
RUN_ONCE = 1;
39+
40+
// Run post startup script after runtime is stopped.
41+
RUN_EVERY_START = 2;
42+
43+
// Download and run post startup script every time runtime is started.
44+
DOWNLOAD_AND_RUN_EVERY_START = 3;
45+
}
46+
47+
// Optional. Post startup script to run after runtime is started.
48+
string post_startup_script = 1 [(google.api.field_behavior) = OPTIONAL];
49+
50+
// Optional. Post startup script url to download. Example:
51+
// https://bucket/script.sh
52+
string post_startup_script_url = 2 [(google.api.field_behavior) = OPTIONAL];
53+
54+
// Optional. Post startup script behavior that defines download and execution
55+
// behavior.
56+
PostStartupScriptBehavior post_startup_script_behavior = 3
57+
[(google.api.field_behavior) = OPTIONAL];
58+
}
59+
60+
// Notebook Software Config.
61+
message NotebookSoftwareConfig {
62+
// Optional. Environment variables to be passed to the container.
63+
// Maximum limit is 100.
64+
repeated EnvVar env = 1 [(google.api.field_behavior) = OPTIONAL];
65+
66+
// Optional. Post startup script config.
67+
PostStartupScriptConfig post_startup_script_config = 2
68+
[(google.api.field_behavior) = OPTIONAL];
69+
}

0 commit comments

Comments
 (0)