Skip to content

Commit 42b72b3

Browse files
Google APIscopybara-github
authored andcommitted
feat: add Notebooks Runtime Software Configuration
docs: A comment for field `filter` in message `.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest` is changed docs: A comment for field `filter` in message `.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest` is changed PiperOrigin-RevId: 724378909
1 parent 54fc426 commit 42b72b3

4 files changed

Lines changed: 87 additions & 0 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ proto_library(
109109
"notebook_runtime.proto",
110110
"notebook_runtime_template_ref.proto",
111111
"notebook_service.proto",
112+
"notebook_software_config.proto",
112113
"openapi.proto",
113114
"operation.proto",
114115
"persistent_resource.proto",

‎google/cloud/aiplatform/v1/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/v1/network_spec.proto";
2424
import "google/cloud/aiplatform/v1/notebook_euc_config.proto";
2525
import "google/cloud/aiplatform/v1/notebook_idle_shutdown_config.proto";
2626
import "google/cloud/aiplatform/v1/notebook_runtime_template_ref.proto";
27+
import "google/cloud/aiplatform/v1/notebook_software_config.proto";
2728
import "google/protobuf/timestamp.proto";
2829

2930
option csharp_namespace = "Google.Cloud.AIPlatform.V1";
@@ -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/v1/notebook_service.proto‎

Lines changed: 8 additions & 0 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.
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.v1;
18+
19+
import "google/api/field_behavior.proto";
20+
import "google/cloud/aiplatform/v1/env_var.proto";
21+
22+
option csharp_namespace = "Google.Cloud.AIPlatform.V1";
23+
option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb";
24+
option java_multiple_files = true;
25+
option java_outer_classname = "NotebookSoftwareConfigProto";
26+
option java_package = "com.google.cloud.aiplatform.v1";
27+
option php_namespace = "Google\\Cloud\\AIPlatform\\V1";
28+
option ruby_package = "Google::Cloud::AIPlatform::V1";
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)