1// Copyright 2023 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 15syntax = "proto3"; 16 17package google.cloud.aiplatform.v1beta1; 18 19import "google/api/field_behavior.proto"; 20import "google/api/resource.proto"; 21import "google/cloud/aiplatform/v1beta1/machine_resources.proto"; 22import "google/cloud/aiplatform/v1beta1/network_spec.proto"; 23import "google/cloud/aiplatform/v1beta1/notebook_euc_config.proto"; 24import "google/cloud/aiplatform/v1beta1/notebook_idle_shutdown_config.proto"; 25import "google/cloud/aiplatform/v1beta1/notebook_runtime_template_ref.proto"; 26import "google/protobuf/timestamp.proto"; 27 28option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; 29option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; 30option java_multiple_files = true; 31option java_outer_classname = "NotebookRuntimeProto"; 32option java_package = "com.google.cloud.aiplatform.v1beta1"; 33option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; 34option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; 35 36// Represents a notebook runtime type. 37enum NotebookRuntimeType { 38 // Unspecified notebook runtime type, NotebookRuntimeType will default to 39 // USER_DEFINED. 40 NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED = 0; 41 42 // runtime or template with coustomized configurations from user. 43 USER_DEFINED = 1; 44 45 // runtime or template with system defined configurations. 46 ONE_CLICK = 2; 47} 48 49// A template that specifies runtime configurations such as machine type, 50// runtime version, network configurations, etc. 51// Multiple runtimes can be created from a runtime template. 52message NotebookRuntimeTemplate { 53 option (google.api.resource) = { 54 type: "aiplatform.googleapis.com/NotebookRuntimeTemplate" 55 pattern: "projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}" 56 }; 57 58 // Output only. The resource name of the NotebookRuntimeTemplate. 59 string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 60 61 // Required. The display name of the NotebookRuntimeTemplate. 62 // The name can be up to 128 characters long and can consist of any UTF-8 63 // characters. 64 string display_name = 2 [(google.api.field_behavior) = REQUIRED]; 65 66 // The description of the NotebookRuntimeTemplate. 67 string description = 3; 68 69 // Output only. The default template to use if not specified. 70 bool is_default = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 71 72 // Optional. Immutable. The specification of a single machine for the 73 // template. 74 MachineSpec machine_spec = 5 [ 75 (google.api.field_behavior) = OPTIONAL, 76 (google.api.field_behavior) = IMMUTABLE 77 ]; 78 79 // Optional. The specification of [persistent 80 // disk][https://cloud.google.com/compute/docs/disks/persistent-disks] 81 // attached to the runtime as data disk storage. 82 PersistentDiskSpec data_persistent_disk_spec = 8 83 [(google.api.field_behavior) = OPTIONAL]; 84 85 // Optional. Network spec. 86 NetworkSpec network_spec = 12 [(google.api.field_behavior) = OPTIONAL]; 87 88 // The service account that the runtime workload runs as. 89 // You can use any service account within the same project, but you 90 // must have the service account user permission to use the instance. 91 // 92 // If not specified, the [Compute Engine default service 93 // account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) 94 // is used. 95 string service_account = 13; 96 97 // Used to perform consistent read-modify-write updates. If not set, a blind 98 // "overwrite" update happens. 99 string etag = 14; 100 101 // The labels with user-defined metadata to organize the 102 // NotebookRuntimeTemplates. 103 // 104 // Label keys and values can be no longer than 64 characters 105 // (Unicode codepoints), can only contain lowercase letters, numeric 106 // characters, underscores and dashes. International characters are allowed. 107 // 108 // See https://goo.gl/xmQnxf for more information and examples of labels. 109 map<string, string> labels = 15; 110 111 // The idle shutdown configuration of NotebookRuntimeTemplate. This config 112 // will only be set when idle shutdown is enabled. 113 NotebookIdleShutdownConfig idle_shutdown_config = 17; 114 115 // EUC configuration of the NotebookRuntimeTemplate. 116 NotebookEucConfig euc_config = 18; 117 118 // Output only. Timestamp when this NotebookRuntimeTemplate was created. 119 google.protobuf.Timestamp create_time = 10 120 [(google.api.field_behavior) = OUTPUT_ONLY]; 121 122 // Output only. Timestamp when this NotebookRuntimeTemplate was most recently 123 // updated. 124 google.protobuf.Timestamp update_time = 11 125 [(google.api.field_behavior) = OUTPUT_ONLY]; 126 127 // Optional. Immutable. The type of the notebook runtime template. 128 NotebookRuntimeType notebook_runtime_type = 19 [ 129 (google.api.field_behavior) = OPTIONAL, 130 (google.api.field_behavior) = IMMUTABLE 131 ]; 132 133 // Optional. Immutable. Runtime Shielded VM spec. 134 ShieldedVmConfig shielded_vm_config = 20 [ 135 (google.api.field_behavior) = OPTIONAL, 136 (google.api.field_behavior) = IMMUTABLE 137 ]; 138 139 // Optional. The Compute Engine tags to add to runtime (see [Tagging 140 // instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)). 141 repeated string network_tags = 21 [(google.api.field_behavior) = OPTIONAL]; 142} 143 144// A runtime is a virtual machine allocated to a particular user for a 145// particular Notebook file on temporary basis with lifetime limited to 24 146// hours. 147message NotebookRuntime { 148 option (google.api.resource) = { 149 type: "aiplatform.googleapis.com/NotebookRuntime" 150 pattern: "projects/{project}/locations/{location}/notebookRuntimes/{notebook_runtime}" 151 }; 152 153 // The substate of the NotebookRuntime to display health information. 154 enum HealthState { 155 // Unspecified health state. 156 HEALTH_STATE_UNSPECIFIED = 0; 157 158 // NotebookRuntime is in healthy state. Applies to ACTIVE state. 159 HEALTHY = 1; 160 161 // NotebookRuntime is in unhealthy state. Applies to ACTIVE state. 162 UNHEALTHY = 2; 163 } 164 165 // The substate of the NotebookRuntime to display state of runtime. 166 // The resource of NotebookRuntime is in ACTIVE state for these sub state. 167 enum RuntimeState { 168 // Unspecified runtime state. 169 RUNTIME_STATE_UNSPECIFIED = 0; 170 171 // NotebookRuntime is in running state. 172 RUNNING = 1; 173 174 // NotebookRuntime is in starting state. 175 BEING_STARTED = 2; 176 177 // NotebookRuntime is in stopping state. 178 BEING_STOPPED = 3; 179 180 // NotebookRuntime is in stopped state. 181 STOPPED = 4; 182 183 // NotebookRuntime is in upgrading state. It is in the middle of upgrading 184 // process. 185 BEING_UPGRADED = 5; 186 187 // NotebookRuntime was unable to start/stop properly. 188 ERROR = 100; 189 190 // NotebookRuntime is in invalid state. Cannot be recovered. 191 INVALID = 101; 192 } 193 194 // Output only. The resource name of the NotebookRuntime. 195 string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 196 197 // Required. The user email of the NotebookRuntime. 198 string runtime_user = 2 [(google.api.field_behavior) = REQUIRED]; 199 200 // Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is 201 // created from. 202 NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 203 [(google.api.field_behavior) = OUTPUT_ONLY]; 204 205 // Output only. The proxy endpoint used to access the NotebookRuntime. 206 string proxy_uri = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; 207 208 // Output only. Timestamp when this NotebookRuntime was created. 209 google.protobuf.Timestamp create_time = 6 210 [(google.api.field_behavior) = OUTPUT_ONLY]; 211 212 // Output only. Timestamp when this NotebookRuntime was most recently updated. 213 google.protobuf.Timestamp update_time = 7 214 [(google.api.field_behavior) = OUTPUT_ONLY]; 215 216 // Output only. The health state of the NotebookRuntime. 217 HealthState health_state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; 218 219 // Required. The display name of the NotebookRuntime. 220 // The name can be up to 128 characters long and can consist of any UTF-8 221 // characters. 222 string display_name = 10 [(google.api.field_behavior) = REQUIRED]; 223 224 // The description of the NotebookRuntime. 225 string description = 11; 226 227 // Output only. The service account that the NotebookRuntime workload runs as. 228 string service_account = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; 229 230 // Output only. The runtime (instance) state of the NotebookRuntime. 231 RuntimeState runtime_state = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; 232 233 // Output only. Whether NotebookRuntime is upgradable. 234 bool is_upgradable = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; 235 236 // The labels with user-defined metadata to organize your 237 // NotebookRuntime. 238 // 239 // Label keys and values can be no longer than 64 characters 240 // (Unicode codepoints), can only contain lowercase letters, numeric 241 // characters, underscores and dashes. International characters are allowed. 242 // No more than 64 user labels can be associated with one NotebookRuntime 243 // (System labels are excluded). 244 // 245 // See https://goo.gl/xmQnxf for more information and examples of labels. 246 // System reserved label keys are prefixed with "aiplatform.googleapis.com/" 247 // and are immutable. Following system labels exist for NotebookRuntime: 248 // 249 // * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output 250 // only, its value is the Compute Engine instance id. 251 // * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is 252 // either "bigquery" or "vertex"; if absent, it should be "vertex". This is to 253 // describe the entry service, either BigQuery or Vertex. 254 map<string, string> labels = 16; 255 256 // Output only. Timestamp when this NotebookRuntime will be expired: 257 // 1. System Predefined NotebookRuntime: 24 hours after creation. After 258 // expiration, system predifined runtime will be deleted. 259 // 2. User created NotebookRuntime: 6 months after last upgrade. After 260 // expiration, user created runtime will be stopped and allowed for upgrade. 261 google.protobuf.Timestamp expiration_time = 17 262 [(google.api.field_behavior) = OUTPUT_ONLY]; 263 264 // Output only. The VM os image version of NotebookRuntime. 265 string version = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; 266 267 // Output only. The type of the notebook runtime. 268 NotebookRuntimeType notebook_runtime_type = 19 269 [(google.api.field_behavior) = OUTPUT_ONLY]; 270 271 // Optional. The Compute Engine tags to add to runtime (see [Tagging 272 // instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)). 273 repeated string network_tags = 25 [(google.api.field_behavior) = OPTIONAL]; 274} 275