Skip to content

Commit

Permalink
feat: add NotebookRuntime resource and APIs to public v1beta1 client …
Browse files Browse the repository at this point in the history
…library

PiperOrigin-RevId: 620347728
  • Loading branch information
Google APIs authored and Copybara-Service committed Mar 29, 2024
1 parent 5e91c45 commit 3ebeb01
Show file tree
Hide file tree
Showing 10 changed files with 1,001 additions and 0 deletions.
6 changes: 6 additions & 0 deletions google/cloud/aiplatform/v1beta1/BUILD.bazel
Expand Up @@ -93,6 +93,12 @@ proto_library(
"model_monitoring.proto",
"model_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",
"persistent_resource.proto",
Expand Down
9 changes: 9 additions & 0 deletions google/cloud/aiplatform/v1beta1/aiplatform_v1beta1.yaml
Expand Up @@ -24,6 +24,7 @@ apis:
- name: google.cloud.aiplatform.v1beta1.MigrationService
- name: google.cloud.aiplatform.v1beta1.ModelGardenService
- name: google.cloud.aiplatform.v1beta1.ModelService
- name: google.cloud.aiplatform.v1beta1.NotebookService
- name: google.cloud.aiplatform.v1beta1.PersistentResourceService
- name: google.cloud.aiplatform.v1beta1.PipelineService
- name: google.cloud.aiplatform.v1beta1.PredictionService
Expand All @@ -38,6 +39,7 @@ apis:
- name: google.longrunning.Operations

types:
- name: google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata
- name: google.cloud.aiplatform.v1beta1.BatchCancelPipelineJobsResponse
- name: google.cloud.aiplatform.v1beta1.BatchCreateFeaturesOperationMetadata
- name: google.cloud.aiplatform.v1beta1.BatchCreateFeaturesResponse
Expand All @@ -63,6 +65,7 @@ types:
- name: google.cloud.aiplatform.v1beta1.CreateIndexEndpointOperationMetadata
- name: google.cloud.aiplatform.v1beta1.CreateIndexOperationMetadata
- name: google.cloud.aiplatform.v1beta1.CreateMetadataStoreOperationMetadata
- name: google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata
- name: google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata
- name: google.cloud.aiplatform.v1beta1.CreateRegistryFeatureOperationMetadata
- name: google.cloud.aiplatform.v1beta1.CreateSpecialistPoolOperationMetadata
Expand Down Expand Up @@ -102,6 +105,7 @@ types:
- name: google.cloud.aiplatform.v1beta1.PurgeExecutionsResponse
- name: google.cloud.aiplatform.v1beta1.RestoreDatasetVersionOperationMetadata
- name: google.cloud.aiplatform.v1beta1.SpecialistPool
- name: google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata
- name: google.cloud.aiplatform.v1beta1.SuggestTrialsMetadata
- name: google.cloud.aiplatform.v1beta1.SuggestTrialsResponse
- name: google.cloud.aiplatform.v1beta1.UndeployIndexOperationMetadata
Expand All @@ -121,6 +125,7 @@ types:
- name: google.cloud.aiplatform.v1beta1.UpdatePersistentResourceOperationMetadata
- name: google.cloud.aiplatform.v1beta1.UpdateSpecialistPoolOperationMetadata
- name: google.cloud.aiplatform.v1beta1.UpdateTensorboardOperationMetadata
- name: google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata
- name: google.cloud.aiplatform.v1beta1.UploadModelOperationMetadata
- name: google.cloud.aiplatform.v1beta1.UploadModelResponse
- name: google.cloud.aiplatform.v1beta1.schema.ImageDataItem
Expand Down Expand Up @@ -806,6 +811,10 @@ authentication:
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: 'google.cloud.aiplatform.v1beta1.NotebookService.*'
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: 'google.cloud.aiplatform.v1beta1.PersistentResourceService.*'
oauth:
canonical_scopes: |-
Expand Down
14 changes: 14 additions & 0 deletions google/cloud/aiplatform/v1beta1/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/v1beta1/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.v1beta1;

import "google/api/resource.proto";

option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb";
option java_multiple_files = true;
option java_outer_classname = "NetworkSpecProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1";
option ruby_package = "Google::Cloud::AIPlatform::V1beta1";
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/v1beta1/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.v1beta1;

import "google/api/field_behavior.proto";

option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb";
option java_multiple_files = true;
option java_outer_classname = "NotebookEucConfigProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1";
option ruby_package = "Google::Cloud::AIPlatform::V1beta1";

// 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];
}
@@ -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.v1beta1;

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

option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb";
option java_multiple_files = true;
option java_outer_classname = "NotebookIdleShutdownConfigProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1";
option ruby_package = "Google::Cloud::AIPlatform::V1beta1";

// 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 3ebeb01

Please sign in to comment.