Skip to content

Commit 69cdc6e

Browse files
Google APIscopybara-github
authored andcommitted
feat: add DatasetVersion and dataset version RPCs to DatasetService
feat: add ListPublisherModels RPC to ModelGardenService chore: remove backend configuration from the service config PiperOrigin-RevId: 570235864
1 parent 31253fd commit 69cdc6e

14 files changed

Lines changed: 321 additions & 97 deletions

google/cloud/aiplatform/v1beta1/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ proto_library(
3333
"data_labeling_job.proto",
3434
"dataset.proto",
3535
"dataset_service.proto",
36+
"dataset_version.proto",
3637
"deployed_index_ref.proto",
3738
"deployed_model_ref.proto",
3839
"deployment_resource_pool.proto",

google/cloud/aiplatform/v1beta1/aiplatform_v1beta1.yaml

Lines changed: 4 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -152,61 +152,6 @@ documentation:
152152
permission-aware UIs and command-line tools, not for authorization
153153
checking. This operation may "fail open" without warning.
154154
155-
backend:
156-
rules:
157-
- selector: 'google.cloud.aiplatform.v1beta1.DatasetService.*'
158-
deadline: 60.0
159-
- selector: 'google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService.*'
160-
deadline: 30.0
161-
- selector: 'google.cloud.aiplatform.v1beta1.EndpointService.*'
162-
deadline: 60.0
163-
- selector: 'google.cloud.aiplatform.v1beta1.FeaturestoreOnlineServingService.*'
164-
deadline: 60.0
165-
- selector: 'google.cloud.aiplatform.v1beta1.FeaturestoreService.*'
166-
deadline: 60.0
167-
- selector: 'google.cloud.aiplatform.v1beta1.IndexEndpointService.*'
168-
deadline: 60.0
169-
- selector: 'google.cloud.aiplatform.v1beta1.IndexService.*'
170-
deadline: 60.0
171-
- selector: 'google.cloud.aiplatform.v1beta1.JobService.*'
172-
deadline: 60.0
173-
- selector: google.cloud.aiplatform.v1beta1.MatchService.FindNeighbors
174-
deadline: 30.0
175-
- selector: google.cloud.aiplatform.v1beta1.MatchService.ReadIndexDatapoints
176-
deadline: 30.0
177-
- selector: 'google.cloud.aiplatform.v1beta1.MetadataService.*'
178-
deadline: 60.0
179-
- selector: google.cloud.aiplatform.v1beta1.MigrationService.BatchMigrateResources
180-
deadline: 60.0
181-
- selector: google.cloud.aiplatform.v1beta1.MigrationService.SearchMigratableResources
182-
deadline: 60.0
183-
- selector: google.cloud.aiplatform.v1beta1.ModelGardenService.GetPublisherModel
184-
deadline: 60.0
185-
- selector: 'google.cloud.aiplatform.v1beta1.ModelService.*'
186-
deadline: 60.0
187-
- selector: 'google.cloud.aiplatform.v1beta1.PersistentResourceService.*'
188-
deadline: 30.0
189-
- selector: 'google.cloud.aiplatform.v1beta1.PipelineService.*'
190-
deadline: 60.0
191-
- selector: 'google.cloud.aiplatform.v1beta1.PredictionService.*'
192-
deadline: 600.0
193-
- selector: 'google.cloud.aiplatform.v1beta1.ScheduleService.*'
194-
deadline: 60.0
195-
- selector: 'google.cloud.aiplatform.v1beta1.SpecialistPoolService.*'
196-
deadline: 60.0
197-
- selector: 'google.cloud.aiplatform.v1beta1.TensorboardService.*'
198-
deadline: 60.0
199-
- selector: 'google.cloud.aiplatform.v1beta1.VizierService.*'
200-
deadline: 60.0
201-
- selector: google.cloud.location.Locations.GetLocation
202-
deadline: 30.0
203-
- selector: google.cloud.location.Locations.ListLocations
204-
deadline: 30.0
205-
- selector: 'google.iam.v1.IAMPolicy.*'
206-
deadline: 60.0
207-
- selector: 'google.longrunning.Operations.*'
208-
deadline: 60.0
209-
210155
http:
211156
rules:
212157
- selector: google.cloud.location.Locations.GetLocation
@@ -715,6 +660,10 @@ authentication:
715660
oauth:
716661
canonical_scopes: |-
717662
https://www.googleapis.com/auth/cloud-platform
663+
- selector: google.cloud.aiplatform.v1beta1.ModelGardenService.ListPublisherModels
664+
oauth:
665+
canonical_scopes: |-
666+
https://www.googleapis.com/auth/cloud-platform
718667
- selector: 'google.cloud.aiplatform.v1beta1.ModelService.*'
719668
oauth:
720669
canonical_scopes: |-

google/cloud/aiplatform/v1beta1/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/v1beta1/annotation.proto";
2424
import "google/cloud/aiplatform/v1beta1/annotation_spec.proto";
2525
import "google/cloud/aiplatform/v1beta1/data_item.proto";
2626
import "google/cloud/aiplatform/v1beta1/dataset.proto";
27+
import "google/cloud/aiplatform/v1beta1/dataset_version.proto";
2728
import "google/cloud/aiplatform/v1beta1/operation.proto";
2829
import "google/cloud/aiplatform/v1beta1/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: "/v1beta1/{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: "/v1beta1/{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: "/v1beta1/{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: "/v1beta1/{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: "/v1beta1/{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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1;
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.V1Beta1";
24+
option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb";
25+
option java_multiple_files = true;
26+
option java_outer_classname = "DatasetVersionProto";
27+
option java_package = "com.google.cloud.aiplatform.v1beta1";
28+
option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1";
29+
option ruby_package = "Google::Cloud::AIPlatform::V1beta1";
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/v1beta1/endpoint.proto

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

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

google/cloud/aiplatform/v1beta1/featurestore_service.proto

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -953,10 +953,6 @@ message DeleteEntityTypeRequest {
953953
// Request message for
954954
// [FeatureRegistryService.CreateFeature][google.cloud.aiplatform.v1beta1.FeatureRegistryService.CreateFeature].
955955
message CreateFeatureRequest {
956-
// The resource name of the EntityType or FeatureGroup to create a Feature.
957-
// Format:
958-
// `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
959-
// `projects/{project}/locations/{location}/featureGroups/{feature_group}`
960956
string parent = 1 [
961957
(google.api.field_behavior) = REQUIRED,
962958
(google.api.resource_reference) = {

google/cloud/aiplatform/v1beta1/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/v1beta1/index_endpoint.proto

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

0 commit comments

Comments
 (0)