Skip to content

Commit eadc874

Browse files
Google APIscopybara-github
authored andcommitted
feat: add additional proto fields and GenerateFetchAccessToken API
PiperOrigin-RevId: 817715744
1 parent 8d338e2 commit eadc874

File tree

6 files changed

+122
-0
lines changed

6 files changed

+122
-0
lines changed

google/cloud/aiplatform/v1/feature_online_store.proto

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,29 @@ message FeatureOnlineStore {
5858
int32 cpu_utilization_target = 3 [(google.api.field_behavior) = OPTIONAL];
5959
}
6060

61+
// Metadata of the Bigtable instance. This is used by direct read access to
62+
// the Bigtable in tenant project.
63+
message BigtableMetadata {
64+
// Tenant project ID.
65+
string tenant_project_id = 1;
66+
67+
// The Cloud Bigtable instance id.
68+
string instance_id = 2;
69+
70+
// The Cloud Bigtable table id.
71+
string table_id = 3;
72+
}
73+
6174
// Required. Autoscaling config applied to Bigtable Instance.
6275
AutoScaling auto_scaling = 1 [(google.api.field_behavior) = REQUIRED];
76+
77+
// Optional. Whether direct access to the Bigtable instance is enabled or not.
78+
bool enable_direct_bigtable_access = 2
79+
[(google.api.field_behavior) = OPTIONAL];
80+
81+
// Output only. Metadata of the Bigtable instance. Output only.
82+
BigtableMetadata bigtable_metadata = 3
83+
[(google.api.field_behavior) = OUTPUT_ONLY];
6384
}
6485

6586
// Optimized storage type

google/cloud/aiplatform/v1/feature_online_store_service.proto

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,16 @@ service FeatureOnlineStoreService {
7070
body: "*"
7171
};
7272
}
73+
74+
// RPC to generate an access token for the given feature view. FeatureViews
75+
// under the same FeatureOnlineStore share the same access token.
76+
rpc GenerateFetchAccessToken(GenerateFetchAccessTokenRequest)
77+
returns (GenerateFetchAccessTokenResponse) {
78+
option (google.api.http) = {
79+
post: "/v1/{feature_view=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:generateFetchAccessToken"
80+
body: "*"
81+
};
82+
}
7383
}
7484

7585
// Format of the data in the Feature View.
@@ -414,3 +424,23 @@ message FeatureViewDirectWriteResponse {
414424
// will not be present.
415425
repeated WriteResponse write_responses = 2;
416426
}
427+
428+
// Request message for
429+
// [FeatureOnlineStoreService.GenerateFetchAccessToken][google.cloud.aiplatform.v1.FeatureOnlineStoreService.GenerateFetchAccessToken].
430+
message GenerateFetchAccessTokenRequest {
431+
// FeatureView resource format
432+
// `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}`
433+
string feature_view = 1 [(google.api.resource_reference) = {
434+
type: "aiplatform.googleapis.com/FeatureView"
435+
}];
436+
}
437+
438+
// Response message for
439+
// [FeatureOnlineStoreService.GenerateFetchAccessToken][google.cloud.aiplatform.v1.FeatureOnlineStoreService.GenerateFetchAccessToken].
440+
message GenerateFetchAccessTokenResponse {
441+
// The OAuth 2.0 access token.
442+
string access_token = 1;
443+
444+
// Token expiration time. This is always set
445+
google.protobuf.Timestamp expire_time = 2;
446+
}

google/cloud/aiplatform/v1/feature_view.proto

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,4 +288,15 @@ message FeatureView {
288288

289289
// Output only. Reserved for future use.
290290
bool satisfies_pzi = 20 [(google.api.field_behavior) = OUTPUT_ONLY];
291+
292+
// Metadata for the Cloud Bigtable that supports directly interacting Bigtable
293+
// instances.
294+
message BigtableMetadata {
295+
// The Bigtable App Profile to use for reading from Bigtable.
296+
string read_app_profile = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
297+
}
298+
299+
// Metadata containing information about the Cloud Bigtable.
300+
BigtableMetadata bigtable_metadata = 21
301+
[(google.api.field_behavior) = OUTPUT_ONLY];
291302
}

google/cloud/aiplatform/v1beta1/feature_online_store.proto

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,29 @@ message FeatureOnlineStore {
5858
int32 cpu_utilization_target = 3 [(google.api.field_behavior) = OPTIONAL];
5959
}
6060

61+
// Metadata of the Bigtable instance. This is used by direct read access to
62+
// the Bigtable in tenant project.
63+
message BigtableMetadata {
64+
// Tenant project ID.
65+
string tenant_project_id = 1;
66+
67+
// The Cloud Bigtable instance id.
68+
string instance_id = 2;
69+
70+
// The Cloud Bigtable table id.
71+
string table_id = 3;
72+
}
73+
6174
// Required. Autoscaling config applied to Bigtable Instance.
6275
AutoScaling auto_scaling = 1 [(google.api.field_behavior) = REQUIRED];
76+
77+
// If true, enable direct access to the Bigtable instance.
78+
bool enable_direct_bigtable_access = 2
79+
[(google.api.field_behavior) = OPTIONAL];
80+
81+
// Metadata of the Bigtable instance. Output only.
82+
BigtableMetadata bigtable_metadata = 3
83+
[(google.api.field_behavior) = OUTPUT_ONLY];
6384
}
6485

6586
// Optimized storage type

google/cloud/aiplatform/v1beta1/feature_online_store_service.proto

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,16 @@ service FeatureOnlineStoreService {
8282
body: "*"
8383
};
8484
}
85+
86+
// RPC to generate an access token for the given feature view. FeatureViews
87+
// under the same FeatureOnlineStore share the same access token.
88+
rpc GenerateFetchAccessToken(GenerateFetchAccessTokenRequest)
89+
returns (GenerateFetchAccessTokenResponse) {
90+
option (google.api.http) = {
91+
post: "/v1beta1/{feature_view=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:generateFetchAccessToken"
92+
body: "*"
93+
};
94+
}
8595
}
8696

8797
// Format of the data in the Feature View.
@@ -507,3 +517,21 @@ message FeatureViewDirectWriteResponse {
507517
// will not be present.
508518
repeated WriteResponse write_responses = 2;
509519
}
520+
521+
// Request message for [FeatureOnlineStoreService.GenerateFetchAccessToken][].
522+
message GenerateFetchAccessTokenRequest {
523+
// FeatureView resource format
524+
// `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}`
525+
string feature_view = 1 [(google.api.resource_reference) = {
526+
type: "aiplatform.googleapis.com/FeatureView"
527+
}];
528+
}
529+
530+
// Response message for [FeatureOnlineStoreService.GenerateFetchAccessToken][].
531+
message GenerateFetchAccessTokenResponse {
532+
// The OAuth 2.0 access token.
533+
string access_token = 1;
534+
535+
// Token expiration time. This is always set
536+
google.protobuf.Timestamp expire_time = 2;
537+
}

google/cloud/aiplatform/v1beta1/feature_view.proto

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,4 +370,15 @@ message FeatureView {
370370

371371
// Output only. Reserved for future use.
372372
bool satisfies_pzi = 20 [(google.api.field_behavior) = OUTPUT_ONLY];
373+
374+
// Metadata for the Cloud Bigtable that supports directly interacting Bigtable
375+
// instances.
376+
message BigtableMetadata {
377+
// The Bigtable App Profile to use for reading from Bigtable.
378+
string read_app_profile = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
379+
}
380+
381+
// Metadata containing information about the Cloud Bigtable.
382+
BigtableMetadata bigtable_metadata = 21
383+
[(google.api.field_behavior) = OUTPUT_ONLY];
373384
}

0 commit comments

Comments
 (0)