Skip to content

Commit

Permalink
feat: Add automated RDB (AKA persistence) (#544)
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 424884640
Source-Link: googleapis/googleapis@28c6bb9
Source-Link: googleapis/googleapis-gen@ea1c8b2
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWExYzhiMmE2NDQ5Y2MzOWQyY2JjY2ZhM2M3MjVmYmE0NzBiZDk0MSJ9
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>
Co-authored-by: Benjamin E. Coe <bencoe@google.com>
  • Loading branch information
3 people authored Feb 2, 2022
1 parent d2448ea commit 0e204ba
Show file tree
Hide file tree
Showing 4 changed files with 620 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,63 @@ message Instance {
// Optional. Read replica mode. Can only be specified when trying to create the
// instance.
ReadReplicasMode read_replicas_mode = 35 [(google.api.field_behavior) = OPTIONAL];

// Optional. Persistence configuration parameters
PersistenceConfig persistence_config = 37 [(google.api.field_behavior) = OPTIONAL];
}

// Configuration of the persistence functionality.
message PersistenceConfig {
// Available Persistence modes.
enum PersistenceMode {
// Not set.
PERSISTENCE_MODE_UNSPECIFIED = 0;

// Persistence is disabled for the instance,
// and any existing snapshots are deleted.
DISABLED = 1;

// RDB based Persistence is enabled.
RDB = 2;
}

// Available snapshot periods for scheduling.
enum SnapshotPeriod {
// Not set.
SNAPSHOT_PERIOD_UNSPECIFIED = 0;

// Snapshot every 1 hour.
ONE_HOUR = 3;

// Snapshot every 6 hours.
SIX_HOURS = 4;

// Snapshot every 12 hours.
TWELVE_HOURS = 5;

// Snapshot every 24 hours.
TWENTY_FOUR_HOURS = 6;
}

// Optional. Controls whether Persistence features are enabled.
// If not provided, the existing value will be used.
PersistenceMode persistence_mode = 1 [(google.api.field_behavior) = OPTIONAL];

// Optional. Period between RDB snapshots. Snapshots will be attempted every period
// starting from the provided snapshot start time. For example, a start time
// of 01/01/2033 06:45 and SIX_HOURS snapshot period will do nothing until
// 01/01/2033, and then trigger snapshots every day at 06:45, 12:45, 18:45,
// and 00:45 the next day, and so on.
// If not provided, TWENTY_FOUR_HOURS will be used as default.
SnapshotPeriod rdb_snapshot_period = 2 [(google.api.field_behavior) = OPTIONAL];

// Output only. The next time that a snapshot attempt is scheduled to occur.
google.protobuf.Timestamp rdb_next_snapshot_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];

// Optional. Date and time that the first snapshot was/will be attempted, and to which
// future snapshots will be aligned.
// If not provided, the current time will be used.
google.protobuf.Timestamp rdb_snapshot_start_time = 5 [(google.api.field_behavior) = OPTIONAL];
}

// Request for [RescheduleMaintenance][google.cloud.redis.v1beta1.CloudRedis.RescheduleMaintenance].
Expand Down
133 changes: 133 additions & 0 deletions packages/google-cloud-redis/protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0e204ba

Please sign in to comment.