Skip to content

Commit 5813201

Browse files
Google APIscopybara-github
authored andcommitted
feat: add DatasetVersion and dataset version RPCs to DatasetService
feat: add PersistentDiskSpec chore: remove backend configuration from the service config PiperOrigin-RevId: 570130129
1 parent 4874ca8 commit 5813201

12 files changed

Lines changed: 260 additions & 62 deletions

google/cloud/aiplatform/v1/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ proto_library(
4040
"data_labeling_job.proto",
4141
"dataset.proto",
4242
"dataset_service.proto",
43+
"dataset_version.proto",
4344
"deployed_index_ref.proto",
4445
"deployed_model_ref.proto",
4546
"encryption_spec.proto",

google/cloud/aiplatform/v1/aiplatform_v1.yaml

Lines changed: 4 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -140,57 +140,6 @@ documentation:
140140
permission-aware UIs and command-line tools, not for authorization
141141
checking. This operation may "fail open" without warning.
142142
143-
backend:
144-
rules:
145-
- selector: 'google.cloud.aiplatform.v1.DatasetService.*'
146-
deadline: 60.0
147-
- selector: 'google.cloud.aiplatform.v1.EndpointService.*'
148-
deadline: 60.0
149-
- selector: 'google.cloud.aiplatform.v1.FeaturestoreOnlineServingService.*'
150-
deadline: 60.0
151-
- selector: 'google.cloud.aiplatform.v1.FeaturestoreService.*'
152-
deadline: 60.0
153-
- selector: 'google.cloud.aiplatform.v1.IndexEndpointService.*'
154-
deadline: 60.0
155-
- selector: 'google.cloud.aiplatform.v1.IndexService.*'
156-
deadline: 60.0
157-
- selector: 'google.cloud.aiplatform.v1.JobService.*'
158-
deadline: 60.0
159-
- selector: google.cloud.aiplatform.v1.MatchService.FindNeighbors
160-
deadline: 30.0
161-
- selector: google.cloud.aiplatform.v1.MatchService.ReadIndexDatapoints
162-
deadline: 30.0
163-
- selector: 'google.cloud.aiplatform.v1.MetadataService.*'
164-
deadline: 60.0
165-
- selector: google.cloud.aiplatform.v1.MigrationService.BatchMigrateResources
166-
deadline: 60.0
167-
- selector: google.cloud.aiplatform.v1.MigrationService.SearchMigratableResources
168-
deadline: 60.0
169-
- selector: google.cloud.aiplatform.v1.ModelGardenService.GetPublisherModel
170-
deadline: 60.0
171-
- selector: 'google.cloud.aiplatform.v1.ModelService.*'
172-
deadline: 60.0
173-
- selector: 'google.cloud.aiplatform.v1.PipelineService.*'
174-
deadline: 60.0
175-
- selector: 'google.cloud.aiplatform.v1.PredictionService.*'
176-
deadline: 600.0
177-
- selector: 'google.cloud.aiplatform.v1.ScheduleService.*'
178-
deadline: 60.0
179-
- selector: 'google.cloud.aiplatform.v1.SpecialistPoolService.*'
180-
deadline: 60.0
181-
- selector: 'google.cloud.aiplatform.v1.TensorboardService.*'
182-
deadline: 60.0
183-
- selector: 'google.cloud.aiplatform.v1.VizierService.*'
184-
deadline: 60.0
185-
- selector: google.cloud.location.Locations.GetLocation
186-
deadline: 30.0
187-
- selector: google.cloud.location.Locations.ListLocations
188-
deadline: 30.0
189-
- selector: 'google.iam.v1.IAMPolicy.*'
190-
deadline: 60.0
191-
- selector: 'google.longrunning.Operations.*'
192-
deadline: 60.0
193-
194143
http:
195144
rules:
196145
- selector: google.cloud.location.Locations.GetLocation
@@ -205,6 +154,7 @@ http:
205154
post: '/v1/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy'
206155
additional_bindings:
207156
- post: '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy'
157+
- post: '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy'
208158
- post: '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy'
209159
- post: '/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy'
210160
- post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy'
@@ -216,6 +166,8 @@ http:
216166
additional_bindings:
217167
- post: '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy'
218168
body: '*'
169+
- post: '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy'
170+
body: '*'
219171
- post: '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy'
220172
body: '*'
221173
- post: '/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy'
@@ -230,6 +182,7 @@ http:
230182
post: '/v1/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions'
231183
additional_bindings:
232184
- post: '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions'
185+
- post: '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions'
233186
- post: '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions'
234187
- post: '/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions'
235188
- post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions'

google/cloud/aiplatform/v1/dataset_service.proto

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import "google/cloud/aiplatform/v1/annotation.proto";
2424
import "google/cloud/aiplatform/v1/annotation_spec.proto";
2525
import "google/cloud/aiplatform/v1/data_item.proto";
2626
import "google/cloud/aiplatform/v1/dataset.proto";
27+
import "google/cloud/aiplatform/v1/dataset_version.proto";
2728
import "google/cloud/aiplatform/v1/operation.proto";
2829
import "google/cloud/aiplatform/v1/saved_query.proto";
2930
import "google/longrunning/operations.proto";
@@ -122,6 +123,63 @@ service DatasetService {
122123
};
123124
}
124125

126+
// Create a version from a Dataset.
127+
rpc CreateDatasetVersion(CreateDatasetVersionRequest)
128+
returns (google.longrunning.Operation) {
129+
option (google.api.http) = {
130+
post: "/v1/{parent=projects/*/locations/*/datasets/*}/datasetVersions"
131+
body: "dataset_version"
132+
};
133+
option (google.api.method_signature) = "parent,dataset_version";
134+
option (google.longrunning.operation_info) = {
135+
response_type: "DatasetVersion"
136+
metadata_type: "CreateDatasetVersionOperationMetadata"
137+
};
138+
}
139+
140+
// Deletes a Dataset version.
141+
rpc DeleteDatasetVersion(DeleteDatasetVersionRequest)
142+
returns (google.longrunning.Operation) {
143+
option (google.api.http) = {
144+
delete: "/v1/{name=projects/*/locations/*/datasets/*/datasetVersions/*}"
145+
};
146+
option (google.api.method_signature) = "name";
147+
option (google.longrunning.operation_info) = {
148+
response_type: "google.protobuf.Empty"
149+
metadata_type: "DeleteOperationMetadata"
150+
};
151+
}
152+
153+
// Gets a Dataset version.
154+
rpc GetDatasetVersion(GetDatasetVersionRequest) returns (DatasetVersion) {
155+
option (google.api.http) = {
156+
get: "/v1/{name=projects/*/locations/*/datasets/*/datasetVersions/*}"
157+
};
158+
option (google.api.method_signature) = "name";
159+
}
160+
161+
// Lists DatasetVersions in a Dataset.
162+
rpc ListDatasetVersions(ListDatasetVersionsRequest)
163+
returns (ListDatasetVersionsResponse) {
164+
option (google.api.http) = {
165+
get: "/v1/{parent=projects/*/locations/*/datasets/*}/datasetVersions"
166+
};
167+
option (google.api.method_signature) = "parent";
168+
}
169+
170+
// Restores a dataset version.
171+
rpc RestoreDatasetVersion(RestoreDatasetVersionRequest)
172+
returns (google.longrunning.Operation) {
173+
option (google.api.http) = {
174+
get: "/v1/{name=projects/*/locations/*/datasets/*/datasetVersions/*}:restore"
175+
};
176+
option (google.api.method_signature) = "name";
177+
option (google.longrunning.operation_info) = {
178+
response_type: "DatasetVersion"
179+
metadata_type: "RestoreDatasetVersionOperationMetadata"
180+
};
181+
}
182+
125183
// Lists DataItems in a Dataset.
126184
rpc ListDataItems(ListDataItemsRequest) returns (ListDataItemsResponse) {
127185
option (google.api.http) = {
@@ -369,13 +427,118 @@ message ExportDataOperationMetadata {
369427
string gcs_output_directory = 2;
370428
}
371429

430+
// Request message for
431+
// [DatasetService.CreateDatasetVersion][google.cloud.aiplatform.v1.DatasetService.CreateDatasetVersion].
432+
message CreateDatasetVersionRequest {
433+
// Required. The name of the Dataset resource.
434+
// Format:
435+
// `projects/{project}/locations/{location}/datasets/{dataset}`
436+
string parent = 1 [
437+
(google.api.field_behavior) = REQUIRED,
438+
(google.api.resource_reference) = {
439+
type: "aiplatform.googleapis.com/Dataset"
440+
}
441+
];
442+
443+
// Required. The version to be created. The same CMEK policies with the
444+
// original Dataset will be applied the dataset version. So here we don't need
445+
// to specify the EncryptionSpecType here.
446+
DatasetVersion dataset_version = 2 [(google.api.field_behavior) = REQUIRED];
447+
}
448+
372449
// Runtime operation information for
373450
// [DatasetService.CreateDatasetVersion][google.cloud.aiplatform.v1.DatasetService.CreateDatasetVersion].
374451
message CreateDatasetVersionOperationMetadata {
375452
// The common part of the operation metadata.
376453
GenericOperationMetadata generic_metadata = 1;
377454
}
378455

456+
// Request message for
457+
// [DatasetService.DeleteDatasetVersion][google.cloud.aiplatform.v1.DatasetService.DeleteDatasetVersion].
458+
message DeleteDatasetVersionRequest {
459+
// Required. The resource name of the Dataset version to delete.
460+
// Format:
461+
// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
462+
string name = 1 [
463+
(google.api.field_behavior) = REQUIRED,
464+
(google.api.resource_reference) = {
465+
type: "aiplatform.googleapis.com/DatasetVersion"
466+
}
467+
];
468+
}
469+
470+
// Request message for
471+
// [DatasetService.GetDatasetVersion][google.cloud.aiplatform.v1.DatasetService.GetDatasetVersion].
472+
message GetDatasetVersionRequest {
473+
// Required. The resource name of the Dataset version to delete.
474+
// Format:
475+
// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
476+
string name = 1 [
477+
(google.api.field_behavior) = REQUIRED,
478+
(google.api.resource_reference) = {
479+
type: "aiplatform.googleapis.com/DatasetVersion"
480+
}
481+
];
482+
483+
// Mask specifying which fields to read.
484+
google.protobuf.FieldMask read_mask = 2;
485+
}
486+
487+
// Request message for
488+
// [DatasetService.ListDatasetVersions][google.cloud.aiplatform.v1.DatasetService.ListDatasetVersions].
489+
message ListDatasetVersionsRequest {
490+
// Required. The resource name of the Dataset to list DatasetVersions from.
491+
// Format:
492+
// `projects/{project}/locations/{location}/datasets/{dataset}`
493+
string parent = 1 [
494+
(google.api.field_behavior) = REQUIRED,
495+
(google.api.resource_reference) = {
496+
type: "aiplatform.googleapis.com/Dataset"
497+
}
498+
];
499+
500+
// Optional. The standard list filter.
501+
string filter = 2 [(google.api.field_behavior) = OPTIONAL];
502+
503+
// Optional. The standard list page size.
504+
int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
505+
506+
// Optional. The standard list page token.
507+
string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
508+
509+
// Optional. Mask specifying which fields to read.
510+
google.protobuf.FieldMask read_mask = 5
511+
[(google.api.field_behavior) = OPTIONAL];
512+
513+
// Optional. A comma-separated list of fields to order by, sorted in ascending
514+
// order. Use "desc" after a field name for descending.
515+
string order_by = 6 [(google.api.field_behavior) = OPTIONAL];
516+
}
517+
518+
// Response message for
519+
// [DatasetService.ListDatasetVersions][google.cloud.aiplatform.v1.DatasetService.ListDatasetVersions].
520+
message ListDatasetVersionsResponse {
521+
// A list of DatasetVersions that matches the specified filter in the request.
522+
repeated DatasetVersion dataset_versions = 1;
523+
524+
// The standard List next-page token.
525+
string next_page_token = 2;
526+
}
527+
528+
// Request message for
529+
// [DatasetService.RestoreDatasetVersion][google.cloud.aiplatform.v1.DatasetService.RestoreDatasetVersion].
530+
message RestoreDatasetVersionRequest {
531+
// Required. The name of the DatasetVersion resource.
532+
// Format:
533+
// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
534+
string name = 1 [
535+
(google.api.field_behavior) = REQUIRED,
536+
(google.api.resource_reference) = {
537+
type: "aiplatform.googleapis.com/DatasetVersion"
538+
}
539+
];
540+
}
541+
379542
// Runtime operation information for
380543
// [DatasetService.RestoreDatasetVersion][google.cloud.aiplatform.v1.DatasetService.RestoreDatasetVersion].
381544
message RestoreDatasetVersionOperationMetadata {
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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+
15+
syntax = "proto3";
16+
17+
package google.cloud.aiplatform.v1;
18+
19+
import "google/api/field_behavior.proto";
20+
import "google/api/resource.proto";
21+
import "google/protobuf/timestamp.proto";
22+
23+
option csharp_namespace = "Google.Cloud.AIPlatform.V1";
24+
option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb";
25+
option java_multiple_files = true;
26+
option java_outer_classname = "DatasetVersionProto";
27+
option java_package = "com.google.cloud.aiplatform.v1";
28+
option php_namespace = "Google\\Cloud\\AIPlatform\\V1";
29+
option ruby_package = "Google::Cloud::AIPlatform::V1";
30+
31+
// Describes the dataset version.
32+
message DatasetVersion {
33+
option (google.api.resource) = {
34+
type: "aiplatform.googleapis.com/DatasetVersion"
35+
pattern: "projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}"
36+
};
37+
38+
// Output only. The resource name of the DatasetVersion.
39+
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
40+
41+
// Output only. Timestamp when this DatasetVersion was created.
42+
google.protobuf.Timestamp create_time = 2
43+
[(google.api.field_behavior) = OUTPUT_ONLY];
44+
45+
// Output only. Timestamp when this DatasetVersion was last updated.
46+
google.protobuf.Timestamp update_time = 6
47+
[(google.api.field_behavior) = OUTPUT_ONLY];
48+
49+
// Used to perform consistent read-modify-write updates. If not set, a blind
50+
// "overwrite" update happens.
51+
string etag = 3;
52+
53+
// Output only. Name of the associated BigQuery dataset.
54+
string big_query_dataset_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
55+
}

google/cloud/aiplatform/v1/endpoint.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ message DeployedModel {
164164
// Immutable. The ID of the DeployedModel. If not provided upon deployment,
165165
// Vertex AI will generate a value for this ID.
166166
//
167-
// This value should be 1-10 characters, and valid characters are /[0-9]/.
167+
// This value should be 1-10 characters, and valid characters are `/[0-9]/`.
168168
string id = 1 [(google.api.field_behavior) = IMMUTABLE];
169169

170170
// Required. The resource name of the Model that this is the deployment of.

google/cloud/aiplatform/v1/index.proto

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ message Index {
4545
INDEX_UPDATE_METHOD_UNSPECIFIED = 0;
4646

4747
// BatchUpdate: user can call UpdateIndex with files on Cloud Storage of
48-
// datapoints to update.
48+
// Datapoints to update.
4949
BATCH_UPDATE = 1;
5050

5151
// StreamUpdate: user can call UpsertDatapoints/DeleteDatapoints to update
@@ -132,13 +132,13 @@ message IndexDatapoint {
132132
// Restriction of a datapoint which describe its attributes(tokens) from each
133133
// of several attribute categories(namespaces).
134134
message Restriction {
135-
// The namespace of this restriction. eg: color.
135+
// The namespace of this restriction. e.g.: color.
136136
string namespace = 1;
137137

138-
// The attributes to allow in this namespace. eg: 'red'
138+
// The attributes to allow in this namespace. e.g.: 'red'
139139
repeated string allow_list = 2;
140140

141-
// The attributes to deny in this namespace. eg: 'blue'
141+
// The attributes to deny in this namespace. e.g.: 'blue'
142142
repeated string deny_list = 3;
143143
}
144144

@@ -163,7 +163,7 @@ message IndexDatapoint {
163163

164164
// Optional. List of Restrict of the datapoint, used to perform "restricted
165165
// searches" where boolean rule are used to filter the subset of the database
166-
// eligible for matching. See:
166+
// eligible for matching. This uses categorical tokens. See:
167167
// https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
168168
repeated Restriction restricts = 4 [(google.api.field_behavior) = OPTIONAL];
169169

google/cloud/aiplatform/v1/index_endpoint.proto

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,10 @@ message DeployedIndex {
233233
//
234234
// The value should be the name of the address
235235
// (https://cloud.google.com/compute/docs/reference/rest/v1/addresses)
236-
// Example: 'vertex-ai-ip-range'.
236+
// Example: ['vertex-ai-ip-range'].
237+
//
238+
// For more information about subnets and network IP ranges, please see
239+
// https://cloud.google.com/vpc/docs/subnets#manually_created_subnet_ip_ranges.
237240
repeated string reserved_ip_ranges = 10
238241
[(google.api.field_behavior) = OPTIONAL];
239242

0 commit comments

Comments
 (0)