Skip to content

Commit 38ed7d6

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: 898990233
1 parent e182cf5 commit 38ed7d6

5 files changed

Lines changed: 143 additions & 11 deletions

File tree

google/cloud/vectorsearch/v1beta/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/v1beta/data_object_search_service.proto

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

176176
// Defines a search operation using a query vector.
177177
message VectorSearch {
178+
// Specifies the type of vector to use for the query.
178179
oneof vector_type {
179180
// A dense vector for the query.
180181
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.v1beta;
18+
19+
import "google/api/field_behavior.proto";
20+
import "google/api/resource.proto";
21+
22+
option csharp_namespace = "Google.Cloud.VectorSearch.V1Beta";
23+
option go_package = "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb;vectorsearchpb";
24+
option java_multiple_files = true;
25+
option java_outer_classname = "EncryptionSpecProto";
26+
option java_package = "com.google.cloud.vectorsearch.v1beta";
27+
option php_namespace = "Google\\Cloud\\VectorSearch\\V1beta";
28+
option ruby_package = "Google::Cloud::VectorSearch::V1beta";
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/v1beta/vectorsearch_service.proto

Lines changed: 77 additions & 5 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/v1beta/common.proto";
2525
import "google/cloud/vectorsearch/v1beta/embedding_config.proto";
26+
import "google/cloud/vectorsearch/v1beta/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: "/v1beta/{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) = {
@@ -216,8 +230,18 @@ message Collection {
216230
// Optional. JSON Schema for data.
217231
// Field names must contain only alphanumeric characters,
218232
// underscores, and hyphens.
233+
// The schema must be compliant with
234+
// [JSON Schema Draft 7](https://json-schema.org/draft-07/schema).
219235
google.protobuf.Struct data_schema = 10
220236
[(google.api.field_behavior) = OPTIONAL];
237+
238+
// Optional. Immutable. Specifies the customer-managed encryption key spec for
239+
// a Collection. If set, this Collection and all sub-resources of this
240+
// Collection will be secured by this key.
241+
EncryptionSpec encryption_spec = 11 [
242+
(google.api.field_behavior) = IMMUTABLE,
243+
(google.api.field_behavior) = OPTIONAL
244+
];
221245
}
222246

223247
// Message describing a vector field.
@@ -505,6 +529,48 @@ message CreateIndexRequest {
505529
];
506530
}
507531

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

684-
// The exported Data Objects will be in JSON format.
685-
JSON = 1;
750+
// Deprecated: Exports Data Objects in `JSON` format. Use `JSONL` instead.
751+
JSON = 1 [deprecated = true];
752+
753+
// Exports Data Objects in `JSONL` format.
754+
JSONL = 2;
686755
}
687756

688757
// Required. URI prefix of the Cloud Storage where to export Data Objects.
@@ -729,12 +798,15 @@ message DedicatedInfrastructure {
729798
// Specification for autoscaling.
730799
message AutoscalingSpec {
731800
// Optional. The minimum number of replicas. If not set or set to `0`,
732-
// defaults to `2`. Must be >= `2` and <= `1000`.
801+
// defaults to `2`. Must be >= `1` and <= `1000`.
733802
int32 min_replica_count = 1 [(google.api.field_behavior) = OPTIONAL];
734803

735-
// Optional. The maximum number of replicas. If not set or set to `0`,
736-
// defaults to the greater of `min_replica_count` and `5`. Must be >=
804+
// Optional. The maximum number of replicas. Must be >=
737805
// `min_replica_count` and <= `1000`.
806+
// For the v1beta version, if not set or set to `0`, defaults to
807+
// the greater of `min_replica_count` and `5`.
808+
// For all other versions, if not set or set to `0`, defaults to
809+
// the greater of `min_replica_count` and `2`.
738810
int32 max_replica_count = 2 [(google.api.field_behavior) = OPTIONAL];
739811
}
740812

google/cloud/vectorsearch/v1beta/vectorsearch_v1beta.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)