Skip to content

Commit b6fa58e

Browse files
Google APIscopybara-github
authored andcommitted
feat: refreshes Bigtable Admin API(s) protos
PiperOrigin-RevId: 448988001
1 parent cf88418 commit b6fa58e

5 files changed

Lines changed: 138 additions & 114 deletions

File tree

google/bigtable/admin/v2/bigtable_instance_admin.proto

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,37 @@ message UpdateInstanceMetadata {
484484

485485
// The metadata for the Operation returned by CreateCluster.
486486
message CreateClusterMetadata {
487+
// Progress info for copying a table's data to the new cluster.
488+
message TableProgress {
489+
enum State {
490+
STATE_UNSPECIFIED = 0;
491+
492+
// The table has not yet begun copying to the new cluster.
493+
PENDING = 1;
494+
495+
// The table is actively being copied to the new cluster.
496+
COPYING = 2;
497+
498+
// The table has been fully copied to the new cluster.
499+
COMPLETED = 3;
500+
501+
// The table was deleted before it finished copying to the new cluster.
502+
// Note that tables deleted after completion will stay marked as
503+
// COMPLETED, not CANCELLED.
504+
CANCELLED = 4;
505+
}
506+
507+
// Estimate of the size of the table to be copied.
508+
int64 estimated_size_bytes = 2;
509+
510+
// Estimate of the number of bytes copied so far for this table.
511+
// This will eventually reach 'estimated_size_bytes' unless the table copy
512+
// is CANCELLED.
513+
int64 estimated_copied_bytes = 3;
514+
515+
State state = 4;
516+
}
517+
487518
// The request that prompted the initiation of this CreateCluster operation.
488519
CreateClusterRequest original_request = 1;
489520

@@ -492,6 +523,16 @@ message CreateClusterMetadata {
492523

493524
// The time at which the operation failed or was completed successfully.
494525
google.protobuf.Timestamp finish_time = 3;
526+
527+
// Keys: the full `name` of each table that existed in the instance when
528+
// CreateCluster was first called, i.e.
529+
// `projects/<project>/instances/<instance>/tables/<table>`. Any table added
530+
// to the instance by a later API call will be created in the new cluster by
531+
// that API call, not this one.
532+
//
533+
// Values: information on how much of a table's data has been copied to the
534+
// newly-created cluster so far.
535+
map<string, TableProgress> tables = 4;
495536
}
496537

497538
// The metadata for the Operation returned by UpdateCluster.

google/bigtable/admin/v2/bigtableadmin_grpc_service_config.json

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
],
106106
"timeout": "60s",
107107
"retryPolicy": {
108+
"maxAttempts": 5,
108109
"initialBackoff": "1s",
109110
"maxBackoff": "60s",
110111
"backoffMultiplier": 2,
@@ -144,39 +145,35 @@
144145
},
145146
{
146147
"service": "google.bigtable.admin.v2.BigtableInstanceAdmin",
147-
"method": "GetCluster"
148+
"method": "UpdateInstance"
148149
},
149150
{
150151
"service": "google.bigtable.admin.v2.BigtableInstanceAdmin",
151-
"method": "UpdateCluster"
152+
"method": "PartialUpdateInstance"
152153
},
153154
{
154155
"service": "google.bigtable.admin.v2.BigtableInstanceAdmin",
155-
"method": "PartialUpdateCluster"
156+
"method": "GetCluster"
156157
},
157158
{
158159
"service": "google.bigtable.admin.v2.BigtableInstanceAdmin",
159160
"method": "ListClusters"
160161
},
161162
{
162163
"service": "google.bigtable.admin.v2.BigtableInstanceAdmin",
163-
"method": "GetAppProfile"
164-
},
165-
{
166-
"service": "google.bigtable.admin.v2.BigtableInstanceAdmin",
167-
"method": "ListAppProfiles"
164+
"method": "UpdateCluster"
168165
},
169166
{
170167
"service": "google.bigtable.admin.v2.BigtableInstanceAdmin",
171-
"method": "UpdateAppProfile"
168+
"method": "GetAppProfile"
172169
},
173170
{
174171
"service": "google.bigtable.admin.v2.BigtableInstanceAdmin",
175-
"method": "UpdateInstance"
172+
"method": "ListAppProfiles"
176173
},
177174
{
178175
"service": "google.bigtable.admin.v2.BigtableInstanceAdmin",
179-
"method": "PartialUpdateInstance"
176+
"method": "UpdateAppProfile"
180177
},
181178
{
182179
"service": "google.bigtable.admin.v2.BigtableInstanceAdmin",

google/bigtable/admin/v2/common.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Google LLC
1+
// Copyright 2022 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.
@@ -16,8 +16,8 @@ syntax = "proto3";
1616

1717
package google.bigtable.admin.v2;
1818

19-
import "google/protobuf/timestamp.proto";
2019
import "google/api/annotations.proto";
20+
import "google/protobuf/timestamp.proto";
2121

2222
option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2";
2323
option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin";

google/bigtable/admin/v2/instance.proto

Lines changed: 48 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ syntax = "proto3";
1616

1717
package google.bigtable.admin.v2;
1818

19+
import "google/api/annotations.proto";
1920
import "google/api/field_behavior.proto";
2021
import "google/api/resource.proto";
2122
import "google/bigtable/admin/v2/common.proto";
2223
import "google/protobuf/timestamp.proto";
23-
import "google/api/annotations.proto";
2424

2525
option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2";
2626
option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin";
@@ -69,19 +69,14 @@ message Instance {
6969
// on the cluster.
7070
PRODUCTION = 1;
7171

72-
// The instance is meant for development and testing purposes only; it has
73-
// no performance or uptime guarantees and is not covered by SLA.
74-
// After a development instance is created, it can be upgraded by
75-
// updating the instance to type `PRODUCTION`. An instance created
76-
// as a production instance cannot be changed to a development instance.
77-
// When creating a development instance, `serve_nodes` on the cluster must
78-
// not be set.
72+
// DEPRECATED: Prefer PRODUCTION for all use cases, as it no longer enforces
73+
// a higher minimum node count than DEVELOPMENT.
7974
DEVELOPMENT = 2;
8075
}
8176

8277
// The unique name of the instance. Values are of the form
8378
// `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`.
84-
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
79+
string name = 1;
8580

8681
// Required. The descriptive name for this instance as it appears in UIs.
8782
// Can be changed at any time, but should be kept globally unique
@@ -141,6 +136,31 @@ message Cluster {
141136
pattern: "projects/{project}/instances/{instance}/clusters/{cluster}"
142137
};
143138

139+
// Possible states of a cluster.
140+
enum State {
141+
// The state of the cluster could not be determined.
142+
STATE_NOT_KNOWN = 0;
143+
144+
// The cluster has been successfully created and is ready to serve requests.
145+
READY = 1;
146+
147+
// The cluster is currently being created, and may be destroyed
148+
// if the creation process encounters an error.
149+
// A cluster may not be able to serve requests while being created.
150+
CREATING = 2;
151+
152+
// The cluster is currently being resized, and may revert to its previous
153+
// node count if the process encounters an error.
154+
// A cluster is still capable of serving requests while being resized,
155+
// but may exhibit performance as if its number of allocated nodes is
156+
// between the starting and requested states.
157+
RESIZING = 3;
158+
159+
// The cluster has no backing nodes. The data (tables) still
160+
// exist, but no operations can be performed on the cluster.
161+
DISABLED = 4;
162+
}
163+
144164
// Autoscaling config for a cluster.
145165
message ClusterAutoscalingConfig {
146166
// Required. Autoscaling limits for this cluster.
@@ -166,50 +186,30 @@ message Cluster {
166186
// `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
167187
// 2) Only regional keys can be used and the region of the CMEK key must
168188
// match the region of the cluster.
189+
// 3) All clusters within an instance must use the same CMEK key.
190+
// Values are of the form
191+
// `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}`
169192
string kms_key_name = 1 [(google.api.resource_reference) = {
170-
type: "cloudkms.googleapis.com/CryptoKey"
171-
}];
172-
}
173-
174-
// Possible states of a cluster.
175-
enum State {
176-
// The state of the cluster could not be determined.
177-
STATE_NOT_KNOWN = 0;
178-
179-
// The cluster has been successfully created and is ready to serve requests.
180-
READY = 1;
181-
182-
// The cluster is currently being created, and may be destroyed
183-
// if the creation process encounters an error.
184-
// A cluster may not be able to serve requests while being created.
185-
CREATING = 2;
186-
187-
// The cluster is currently being resized, and may revert to its previous
188-
// node count if the process encounters an error.
189-
// A cluster is still capable of serving requests while being resized,
190-
// but may exhibit performance as if its number of allocated nodes is
191-
// between the starting and requested states.
192-
RESIZING = 3;
193-
194-
// The cluster has no backing nodes. The data (tables) still
195-
// exist, but no operations can be performed on the cluster.
196-
DISABLED = 4;
193+
type: "cloudkms.googleapis.com/CryptoKey"
194+
}];
197195
}
198196

199197
// The unique name of the cluster. Values are of the form
200198
// `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`.
201-
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
199+
string name = 1;
202200

203-
// (`CreationOnly`)
204-
// The location where this cluster's nodes and storage reside. For best
201+
// Immutable. The location where this cluster's nodes and storage reside. For best
205202
// performance, clients should be located as close as possible to this
206203
// cluster. Currently only zones are supported, so values should be of the
207204
// form `projects/{project}/locations/{zone}`.
208-
string location = 2 [(google.api.resource_reference) = {
209-
type: "locations.googleapis.com/Location"
210-
}];
211-
212-
// The current state of the cluster.
205+
string location = 2 [
206+
(google.api.field_behavior) = IMMUTABLE,
207+
(google.api.resource_reference) = {
208+
type: "locations.googleapis.com/Location"
209+
}
210+
];
211+
212+
// Output only. The current state of the cluster.
213213
State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
214214

215215
// The number of nodes allocated to this cluster. More nodes enable higher
@@ -221,14 +221,12 @@ message Cluster {
221221
ClusterConfig cluster_config = 7;
222222
}
223223

224-
// (`CreationOnly`)
225-
// The type of storage used by this cluster to serve its
224+
// Immutable. The type of storage used by this cluster to serve its
226225
// parent instance's tables, unless explicitly overridden.
227-
StorageType default_storage_type = 5;
226+
StorageType default_storage_type = 5 [(google.api.field_behavior) = IMMUTABLE];
228227

229228
// Immutable. The encryption configuration for CMEK-protected clusters.
230-
EncryptionConfig encryption_config = 6
231-
[(google.api.field_behavior) = IMMUTABLE];
229+
EncryptionConfig encryption_config = 6 [(google.api.field_behavior) = IMMUTABLE];
232230
}
233231

234232
// A configuration object describing how Cloud Bigtable should treat traffic
@@ -263,7 +261,6 @@ message AppProfile {
263261
bool allow_transactional_writes = 2;
264262
}
265263

266-
// (`OutputOnly`)
267264
// The unique name of the app profile. Values are of the form
268265
// `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
269266
string name = 1;
@@ -278,7 +275,7 @@ message AppProfile {
278275
// details.
279276
string etag = 2;
280277

281-
// Optional long form description of the use case for this AppProfile.
278+
// Long form description of the use case for this AppProfile.
282279
string description = 3;
283280

284281
// The routing policy for all read/write requests that use this app profile.

0 commit comments

Comments
 (0)