Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

Commit 37504ad

Browse files
feat: add a ClientContext field to Spanner requests (#2493)
* feat: add a ClientContext field to Spanner requests feat: add Secure Parameters to the ClientContext PiperOrigin-RevId: 853323071 Source-Link: googleapis/googleapis@211d22f Source-Link: googleapis/googleapis-gen@bf515c7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmY1MTVjNzYxYWJiODc1ZDMyNWM1ZDI0MzQ0NGFiMDhiZTBhZWNkNSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 01eb3d5 commit 37504ad

9 files changed

Lines changed: 415 additions & 6 deletions

File tree

.jsdoc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -40,7 +40,7 @@ module.exports = {
4040
includePattern: '\\.js$'
4141
},
4242
templates: {
43-
copyright: 'Copyright 2025 Google LLC',
43+
copyright: 'Copyright 2026 Google LLC',
4444
includeDate: false,
4545
sourceFiles: false,
4646
systemName: '@google-cloud/spanner',

protos/google/spanner/v1/spanner.proto

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,15 @@ message RequestOptions {
517517
PRIORITY_HIGH = 3;
518518
}
519519

520+
// Container for various pieces of client-owned context attached to a request.
521+
message ClientContext {
522+
// Optional. Map of parameter name to value for this request. These values
523+
// will be returned by any SECURE_CONTEXT() calls invoked by this request
524+
// (e.g., by queries against Parameterized Secure Views).
525+
map<string, google.protobuf.Value> secure_context = 1
526+
[(google.api.field_behavior) = OPTIONAL];
527+
}
528+
520529
// Priority for the request.
521530
Priority priority = 1;
522531

@@ -544,6 +553,9 @@ message RequestOptions {
544553
// characters. Values that exceed this limit are truncated.
545554
// Any leading underscore (_) characters are removed from the string.
546555
string transaction_tag = 3;
556+
557+
// Optional. Optional context that may be needed for some requests.
558+
ClientContext client_context = 4 [(google.api.field_behavior) = OPTIONAL];
547559
}
548560

549561
// The `DirectedReadOptions` can be used to indicate which replicas or regions

protos/protos.d.ts

Lines changed: 103 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)