Skip to content

Commit 8d0f6d8

Browse files
Google APIscopybara-github
authored andcommitted
feat: Added CMEK support
feat: Added UpdateIndex support docs: Updated documentation for listing locations docs: Updated documentation for Collection.data_schema PiperOrigin-RevId: 898465628
1 parent f01ba6b commit 8d0f6d8

5 files changed

Lines changed: 132 additions & 6 deletions

File tree

google/cloud/vectorsearch/v1/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ proto_library(
2929
"data_object_search_service.proto",
3030
"data_object_service.proto",
3131
"embedding_config.proto",
32+
"encryption_spec.proto",
3233
"vectorsearch_service.proto",
3334
],
3435
deps = [
@@ -348,6 +349,7 @@ load(
348349

349350
csharp_proto_library(
350351
name = "vectorsearch_csharp_proto",
352+
extra_opts = [],
351353
deps = [":vectorsearch_proto"],
352354
)
353355

google/cloud/vectorsearch/v1/data_object_search_service.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ message Search {
145145

146146
// Defines a search operation using a query vector.
147147
message VectorSearch {
148+
// Specifies the type of vector to use for the query.
148149
oneof vector_type {
149150
// A dense vector for the query.
150151
DenseVector vector = 1;
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Copyright 2026 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.vectorsearch.v1;
18+
19+
import "google/api/field_behavior.proto";
20+
import "google/api/resource.proto";
21+
22+
option csharp_namespace = "Google.Cloud.VectorSearch.V1";
23+
option go_package = "cloud.google.com/go/vectorsearch/apiv1/vectorsearchpb;vectorsearchpb";
24+
option java_multiple_files = true;
25+
option java_outer_classname = "EncryptionSpecProto";
26+
option java_package = "com.google.cloud.vectorsearch.v1";
27+
option php_namespace = "Google\\Cloud\\VectorSearch\\V1";
28+
option ruby_package = "Google::Cloud::VectorSearch::V1";
29+
option (google.api.resource_definition) = {
30+
type: "cloudkms.googleapis.com/CryptoKey"
31+
pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}"
32+
};
33+
34+
// Represents a customer-managed encryption key specification that can be
35+
// applied to a Vector Search collection.
36+
message EncryptionSpec {
37+
// Required. Resource name of the Cloud KMS key used to protect the resource.
38+
//
39+
// The Cloud KMS key must be in the same region as the resource. It must have
40+
// the format
41+
// `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
42+
string crypto_key_name = 1 [
43+
(google.api.field_behavior) = REQUIRED,
44+
(google.api.resource_reference) = {
45+
type: "cloudkms.googleapis.com/CryptoKey"
46+
}
47+
];
48+
}

google/cloud/vectorsearch/v1/vectorsearch_service.proto

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import "google/api/field_info.proto";
2323
import "google/api/resource.proto";
2424
import "google/cloud/vectorsearch/v1/common.proto";
2525
import "google/cloud/vectorsearch/v1/embedding_config.proto";
26+
import "google/cloud/vectorsearch/v1/encryption_spec.proto";
2627
import "google/longrunning/operations.proto";
2728
import "google/protobuf/empty.proto";
2829
import "google/protobuf/field_mask.proto";
@@ -135,6 +136,19 @@ service VectorSearchService {
135136
};
136137
}
137138

139+
// Updates the parameters of a single Index.
140+
rpc UpdateIndex(UpdateIndexRequest) returns (google.longrunning.Operation) {
141+
option (google.api.http) = {
142+
patch: "/v1/{index.name=projects/*/locations/*/collections/*/indexes/*}"
143+
body: "index"
144+
};
145+
option (google.api.method_signature) = "index,update_mask";
146+
option (google.longrunning.operation_info) = {
147+
response_type: "Index"
148+
metadata_type: "OperationMetadata"
149+
};
150+
}
151+
138152
// Deletes a single Index.
139153
rpc DeleteIndex(DeleteIndexRequest) returns (google.longrunning.Operation) {
140154
option (google.api.http) = {
@@ -212,8 +226,18 @@ message Collection {
212226
// Optional. JSON Schema for data.
213227
// Field names must contain only alphanumeric characters,
214228
// underscores, and hyphens.
229+
// The schema must be compliant with
230+
// [JSON Schema Draft 7](https://json-schema.org/draft-07/schema).
215231
google.protobuf.Struct data_schema = 10
216232
[(google.api.field_behavior) = OPTIONAL];
233+
234+
// Optional. Immutable. Specifies the customer-managed encryption key spec for
235+
// a Collection. If set, this Collection and all sub-resources of this
236+
// Collection will be secured by this key.
237+
EncryptionSpec encryption_spec = 11 [
238+
(google.api.field_behavior) = IMMUTABLE,
239+
(google.api.field_behavior) = OPTIONAL
240+
];
217241
}
218242

219243
// Message describing a vector field.
@@ -501,6 +525,48 @@ message CreateIndexRequest {
501525
];
502526
}
503527

528+
// Message for updating an Index.
529+
message UpdateIndexRequest {
530+
// Required. The resource being updated.
531+
Index index = 1 [(google.api.field_behavior) = REQUIRED];
532+
533+
// Optional. Specifies the fields to be overwritten in the Index resource by
534+
// the update. The fields specified in the update_mask are relative to the
535+
// resource, not the full request. A field will be overwritten if it is in the
536+
// mask. If the user does not provide a mask then all fields present in the
537+
// request with non-empty values will be overwritten.
538+
//
539+
// The following fields support update:
540+
// * `display_name`
541+
// * `description`
542+
// * `labels`
543+
// * `dedicated_infrastructure.autoscaling_spec.min_replica_count`
544+
// * `dedicated_infrastructure.autoscaling_spec.max_replica_count`
545+
//
546+
// If `*` is provided in the `update_mask`, full replacement of mutable fields
547+
// will be performed.
548+
google.protobuf.FieldMask update_mask = 2
549+
[(google.api.field_behavior) = OPTIONAL];
550+
551+
// Optional. An optional request ID to identify requests. Specify a unique
552+
// request ID so that if you must retry your request, the server will know to
553+
// ignore the request if it has already been completed. The server will
554+
// guarantee that for at least 60 minutes since the first request.
555+
//
556+
// For example, consider a situation where you make an initial request and the
557+
// request times out. If you make the request again with the same request
558+
// ID, the server can check if original operation with the same request ID
559+
// was received, and if so, will ignore the second request. This prevents
560+
// clients from accidentally creating duplicate commitments.
561+
//
562+
// The request ID must be a valid UUID with the exception that zero UUID is
563+
// not supported (00000000-0000-0000-0000-000000000000).
564+
string request_id = 3 [
565+
(google.api.field_info).format = UUID4,
566+
(google.api.field_behavior) = OPTIONAL
567+
];
568+
}
569+
504570
// Message for deleting an Index.
505571
message DeleteIndexRequest {
506572
// Required. The resource name of the Index to delete.

google/cloud/vectorsearch/v1/vectorsearch_v1.yaml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,22 @@ documentation:
3131
- selector: google.cloud.location.Locations.ListLocations
3232
description: |-
3333
Lists information about the supported locations for this service.
34-
This method can be called in two ways:
3534
36-
* **List all public locations:** Use the path `GET /v1/locations`.
37-
* **List project-visible locations:** Use the path
38-
`GET /v1/projects/{project_id}/locations`. This may include public
39-
locations as well as private or other locations specifically visible
40-
to the project.
35+
This method lists locations based on the resource scope provided in
36+
the [ListLocationsRequest.name] field:
37+
38+
* **Global locations**: If `name` is empty, the method lists the
39+
public locations available to all projects. * **Project-specific
40+
locations**: If `name` follows the format
41+
`projects/{project}`, the method lists locations visible to that
42+
specific project. This includes public, private, or other
43+
project-specific locations enabled for the project.
44+
45+
For gRPC and client library implementations, the resource name is
46+
passed as the `name` field. For direct service calls, the resource
47+
name is
48+
incorporated into the request path based on the specific service
49+
implementation and version.
4150
4251
http:
4352
rules:

0 commit comments

Comments
 (0)