|
1 | | -// Copyright 2019 Google LLC |
| 1 | +// Copyright 2022 Google LLC |
2 | 2 | // |
3 | 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
4 | 4 | // you may not use this file except in compliance with the License. |
@@ -36,6 +36,10 @@ option (google.api.resource_definition) = { |
36 | 36 | type: "bigtableadmin.googleapis.com/Table" |
37 | 37 | pattern: "projects/{project}/instances/{instance}/tables/{table}" |
38 | 38 | }; |
| 39 | +option (google.api.resource_definition) = { |
| 40 | + type: "bigtableadmin.googleapis.com/Instance" |
| 41 | + pattern: "projects/{project}/instances/{instance}" |
| 42 | +}; |
39 | 43 |
|
40 | 44 | // Service for reading from and writing to existing Bigtable tables. |
41 | 45 | service Bigtable { |
@@ -152,6 +156,26 @@ service Bigtable { |
152 | 156 | option (google.api.method_signature) = "table_name,row_key,predicate_filter,true_mutations,false_mutations,app_profile_id"; |
153 | 157 | } |
154 | 158 |
|
| 159 | + // Warm up associated instance metadata for this connection. |
| 160 | + // This call is not required but may be useful for connection keep-alive. |
| 161 | + rpc PingAndWarm(PingAndWarmRequest) returns (PingAndWarmResponse) { |
| 162 | + option (google.api.http) = { |
| 163 | + post: "/v2/{name=projects/*/instances/*}:ping" |
| 164 | + body: "*" |
| 165 | + }; |
| 166 | + option (google.api.routing) = { |
| 167 | + routing_parameters { |
| 168 | + field: "name" |
| 169 | + path_template: "{name=projects/*/instances/*}" |
| 170 | + } |
| 171 | + routing_parameters { |
| 172 | + field: "app_profile_id" |
| 173 | + } |
| 174 | + }; |
| 175 | + option (google.api.method_signature) = "name"; |
| 176 | + option (google.api.method_signature) = "name,app_profile_id"; |
| 177 | + } |
| 178 | + |
155 | 179 | // Modifies a row atomically on the server. The method reads the latest |
156 | 180 | // existing timestamp and value from the specified columns and writes a new |
157 | 181 | // entry based on pre-defined read/modify/write rules. The new value for the |
@@ -450,6 +474,27 @@ message CheckAndMutateRowResponse { |
450 | 474 | bool predicate_matched = 1; |
451 | 475 | } |
452 | 476 |
|
| 477 | +// Request message for client connection keep-alive and warming. |
| 478 | +message PingAndWarmRequest { |
| 479 | + // Required. The unique name of the instance to check permissions for as well as |
| 480 | + // respond. Values are of the form `projects/<project>/instances/<instance>`. |
| 481 | + string name = 1 [ |
| 482 | + (google.api.field_behavior) = REQUIRED, |
| 483 | + (google.api.resource_reference) = { |
| 484 | + type: "bigtableadmin.googleapis.com/Instance" |
| 485 | + } |
| 486 | + ]; |
| 487 | + |
| 488 | + // This value specifies routing for replication. If not specified, the |
| 489 | + // "default" application profile will be used. |
| 490 | + string app_profile_id = 2; |
| 491 | +} |
| 492 | + |
| 493 | +// Response message for Bigtable.PingAndWarm connection keepalive and warming. |
| 494 | +message PingAndWarmResponse { |
| 495 | + |
| 496 | +} |
| 497 | + |
453 | 498 | // Request message for Bigtable.ReadModifyWriteRow. |
454 | 499 | message ReadModifyWriteRowRequest { |
455 | 500 | // Required. The unique name of the table to which the read/modify/write rules should be |
|
0 commit comments