Skip to content

Commit

Permalink
feat: add ChangeStreamConfig to CreateTable and UpdateTable
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 534836567
  • Loading branch information
Google APIs authored and Copybara-Service committed May 24, 2023
1 parent e35db43 commit eb2d1f1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
10 changes: 7 additions & 3 deletions google/bigtable/admin/v2/bigtable_table_admin.proto
Expand Up @@ -600,11 +600,15 @@ message UpdateTableRequest {
Table table = 1 [(google.api.field_behavior) = REQUIRED];

// Required. The list of fields to update.
// A mask specifying which fields (e.g. `deletion_protection`) in the `table`
// A mask specifying which fields (e.g. `change_stream_config`) in the `table`
// field should be updated. This mask is relative to the `table` field, not to
// the request message. The wildcard (*) path is currently not supported.
// Currently UpdateTable is only supported for the following field:
// * `deletion_protection`
// Currently UpdateTable is only supported for the following fields:
//
// * `change_stream_config`
// * `change_stream_config.retention_period`
// * `deletion_protection`
//
// If `column_families` is set in `update_mask`, it will return an
// UNIMPLEMENTED error.
google.protobuf.FieldMask update_mask = 2
Expand Down
15 changes: 15 additions & 0 deletions google/bigtable/admin/v2/table.proto
Expand Up @@ -48,6 +48,16 @@ message RestoreInfo {
}
}

// Change stream configuration.
message ChangeStreamConfig {
// How long the change stream should be retained. Change stream data older
// than the retention period will not be returned when reading the change
// stream from the table.
// Values must be at least 1 day and at most 7 days, and will be truncated to
// microsecond granularity.
google.protobuf.Duration retention_period = 1;
}

// A collection of user data indexed by row, column, and timestamp.
// Each table is served using the resources of its parent cluster.
message Table {
Expand Down Expand Up @@ -157,6 +167,11 @@ message Table {
// field will be populated with information about the restore.
RestoreInfo restore_info = 6 [(google.api.field_behavior) = OUTPUT_ONLY];

// If specified, enable the change stream on this table.
// Otherwise, the change stream is disabled and the change stream is not
// retained.
ChangeStreamConfig change_stream_config = 8;

// Set to true to make the table protected against data loss. i.e. deleting
// the following resources through Admin APIs are prohibited:
// - The table.
Expand Down

0 comments on commit eb2d1f1

Please sign in to comment.