Skip to content

Commit

Permalink
feat: add NotebookRuntime resource and APIs to public v1 client library
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 620353345
  • Loading branch information
Google APIs authored and Copybara-Service committed Mar 29, 2024
1 parent b8b25af commit 98ae609
Show file tree
Hide file tree
Showing 9 changed files with 989 additions and 0 deletions.
6 changes: 6 additions & 0 deletions google/cloud/aiplatform/v1/BUILD.bazel
Expand Up @@ -96,6 +96,12 @@ proto_library(
"model_service.proto",
"model_garden_service.proto",
"nas_job.proto",
"network_spec.proto",
"notebook_euc_config.proto",
"notebook_idle_shutdown_config.proto",
"notebook_runtime.proto",
"notebook_runtime_template_ref.proto",
"notebook_service.proto",
"openapi.proto",
"operation.proto",
"pipeline_failure_policy.proto",
Expand Down
9 changes: 9 additions & 0 deletions google/cloud/aiplatform/v1/aiplatform_v1.yaml
Expand Up @@ -21,6 +21,7 @@ apis:
- name: google.cloud.aiplatform.v1.MigrationService
- name: google.cloud.aiplatform.v1.ModelGardenService
- name: google.cloud.aiplatform.v1.ModelService
- name: google.cloud.aiplatform.v1.NotebookService
- name: google.cloud.aiplatform.v1.PipelineService
- name: google.cloud.aiplatform.v1.PredictionService
- name: google.cloud.aiplatform.v1.ScheduleService
Expand All @@ -32,6 +33,7 @@ apis:
- name: google.longrunning.Operations

types:
- name: google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata
- name: google.cloud.aiplatform.v1.BatchCreateFeaturesOperationMetadata
- name: google.cloud.aiplatform.v1.BatchCreateFeaturesResponse
- name: google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata
Expand All @@ -55,6 +57,7 @@ types:
- name: google.cloud.aiplatform.v1.CreateIndexEndpointOperationMetadata
- name: google.cloud.aiplatform.v1.CreateIndexOperationMetadata
- name: google.cloud.aiplatform.v1.CreateMetadataStoreOperationMetadata
- name: google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata
- name: google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata
- name: google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata
- name: google.cloud.aiplatform.v1.CreateTensorboardOperationMetadata
Expand Down Expand Up @@ -88,6 +91,7 @@ types:
- name: google.cloud.aiplatform.v1.PurgeExecutionsResponse
- name: google.cloud.aiplatform.v1.RestoreDatasetVersionOperationMetadata
- name: google.cloud.aiplatform.v1.SpecialistPool
- name: google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata
- name: google.cloud.aiplatform.v1.SuggestTrialsMetadata
- name: google.cloud.aiplatform.v1.SuggestTrialsResponse
- name: google.cloud.aiplatform.v1.UndeployIndexOperationMetadata
Expand All @@ -106,6 +110,7 @@ types:
- name: google.cloud.aiplatform.v1.UpdateModelDeploymentMonitoringJobOperationMetadata
- name: google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata
- name: google.cloud.aiplatform.v1.UpdateTensorboardOperationMetadata
- name: google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata
- name: google.cloud.aiplatform.v1.UploadModelOperationMetadata
- name: google.cloud.aiplatform.v1.UploadModelResponse
- name: google.cloud.aiplatform.v1.schema.ImageBoundingBoxAnnotation
Expand Down Expand Up @@ -718,6 +723,10 @@ authentication:
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: 'google.cloud.aiplatform.v1.NotebookService.*'
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: 'google.cloud.aiplatform.v1.PipelineService.*'
oauth:
canonical_scopes: |-
Expand Down
14 changes: 14 additions & 0 deletions google/cloud/aiplatform/v1/machine_resources.proto
Expand Up @@ -232,3 +232,17 @@ message AutoscalingMetricSpec {
// (representing 60%) if not provided.
int32 target = 2;
}

// A set of Shielded Instance options.
// See [Images using supported Shielded VM
// features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
message ShieldedVmConfig {
// Defines whether the instance has [Secure
// Boot](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot)
// enabled.
//
// Secure Boot helps ensure that the system only runs authentic software by
// verifying the digital signature of all boot components, and halting the
// boot process if signature verification fails.
bool enable_secure_boot = 1;
}
50 changes: 50 additions & 0 deletions google/cloud/aiplatform/v1/network_spec.proto
@@ -0,0 +1,50 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.aiplatform.v1;

import "google/api/resource.proto";

option csharp_namespace = "Google.Cloud.AIPlatform.V1";
option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb";
option java_multiple_files = true;
option java_outer_classname = "NetworkSpecProto";
option java_package = "com.google.cloud.aiplatform.v1";
option php_namespace = "Google\\Cloud\\AIPlatform\\V1";
option ruby_package = "Google::Cloud::AIPlatform::V1";
option (google.api.resource_definition) = {
type: "compute.googleapis.com/Subnetwork"
pattern: "projects/{project}/regions/{region}/subnetworks/{subnetwork}"
};

// Network spec.
message NetworkSpec {
// Whether to enable public internet access. Default false.
bool enable_internet_access = 1;

// The full name of the Google Compute Engine
// [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
string network = 2 [
(google.api.resource_reference) = { type: "compute.googleapis.com/Network" }
];

// The name of the subnet that this instance is in.
// Format:
// `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}`
string subnetwork = 3 [(google.api.resource_reference) = {
type: "compute.googleapis.com/Subnetwork"
}];
}
44 changes: 44 additions & 0 deletions google/cloud/aiplatform/v1/notebook_euc_config.proto
@@ -0,0 +1,44 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.aiplatform.v1;

import "google/api/field_behavior.proto";

option csharp_namespace = "Google.Cloud.AIPlatform.V1";
option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb";
option java_multiple_files = true;
option java_outer_classname = "NotebookEucConfigProto";
option java_package = "com.google.cloud.aiplatform.v1";
option php_namespace = "Google\\Cloud\\AIPlatform\\V1";
option ruby_package = "Google::Cloud::AIPlatform::V1";

// The euc configuration of NotebookRuntimeTemplate.
message NotebookEucConfig {
// Input only. Whether EUC is disabled in this NotebookRuntimeTemplate.
// In proto3, the default value of a boolean is false. In this way, by default
// EUC will be enabled for NotebookRuntimeTemplate.
bool euc_disabled = 1 [(google.api.field_behavior) = INPUT_ONLY];

// Output only. Whether ActAs check is bypassed for service account attached
// to the VM. If false, we need ActAs check for the default Compute Engine
// Service account. When a Runtime is created, a VM is allocated using Default
// Compute Engine Service Account. Any user requesting to use this Runtime
// requires Service Account User (ActAs) permission over this SA. If true,
// Runtime owner is using EUC and does not require the above permission as VM
// no longer use default Compute Engine SA, but a P4SA.
bool bypass_actas_check = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}
41 changes: 41 additions & 0 deletions google/cloud/aiplatform/v1/notebook_idle_shutdown_config.proto
@@ -0,0 +1,41 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.aiplatform.v1;

import "google/api/field_behavior.proto";
import "google/protobuf/duration.proto";

option csharp_namespace = "Google.Cloud.AIPlatform.V1";
option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb";
option java_multiple_files = true;
option java_outer_classname = "NotebookIdleShutdownConfigProto";
option java_package = "com.google.cloud.aiplatform.v1";
option php_namespace = "Google\\Cloud\\AIPlatform\\V1";
option ruby_package = "Google::Cloud::AIPlatform::V1";

// The idle shutdown configuration of NotebookRuntimeTemplate, which contains
// the idle_timeout as required field.
message NotebookIdleShutdownConfig {
// Required. Duration is accurate to the second. In Notebook, Idle Timeout is
// accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
// * 60.
google.protobuf.Duration idle_timeout = 1
[(google.api.field_behavior) = REQUIRED];

// Whether Idle Shutdown is disabled in this NotebookRuntimeTemplate.
bool idle_shutdown_disabled = 2;
}

0 comments on commit 98ae609

Please sign in to comment.