Skip to content

Commit

Permalink
feat: Changed description for recovery_window_days in ContinuousBacku…
Browse files Browse the repository at this point in the history
…pConfig

feat: Added NetworkConfig, deprecated network
feat: Added ClientConnectionConfig
Feat: Added QuantityBasedExpiry
feat: Added DatabaseVersion

PiperOrigin-RevId: 566374690
  • Loading branch information
Google APIs authored and Copybara-Service committed Sep 18, 2023
1 parent ba00ffd commit 1b6be64
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 78 deletions.
68 changes: 0 additions & 68 deletions google/cloud/alloydb/v1/alloydb_v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,71 +150,3 @@ publishing:
common:
destinations:
- PACKAGE_MANAGER
- version: google.cloud.alloydb.v1beta
launch_stage: BETA
java_settings:
common:
destinations:
- PACKAGE_MANAGER
cpp_settings:
common:
destinations:
- PACKAGE_MANAGER
php_settings:
common:
destinations:
- PACKAGE_MANAGER
python_settings:
common:
destinations:
- PACKAGE_MANAGER
node_settings:
common:
destinations:
- PACKAGE_MANAGER
dotnet_settings:
common:
destinations:
- PACKAGE_MANAGER
ruby_settings:
common:
destinations:
- PACKAGE_MANAGER
go_settings:
common:
destinations:
- PACKAGE_MANAGER
- version: google.cloud.alloydb.v1alpha
launch_stage: ALPHA
java_settings:
common:
destinations:
- PACKAGE_MANAGER
cpp_settings:
common:
destinations:
- PACKAGE_MANAGER
php_settings:
common:
destinations:
- PACKAGE_MANAGER
python_settings:
common:
destinations:
- PACKAGE_MANAGER
node_settings:
common:
destinations:
- PACKAGE_MANAGER
dotnet_settings:
common:
destinations:
- PACKAGE_MANAGER
ruby_settings:
common:
destinations:
- PACKAGE_MANAGER
go_settings:
common:
destinations:
- PACKAGE_MANAGER
97 changes: 87 additions & 10 deletions google/cloud/alloydb/v1/resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,9 @@ message ContinuousBackupConfig {
// Whether ContinuousBackup is enabled.
optional bool enabled = 1;

// The number of days backups and logs will be retained, which determines the
// window of time that data is recoverable for. If not set, it defaults to 14
// days.
// The number of days that are eligible to restore from using PITR. To support
// the entire recovery window, backups and logs are retained for one day more
// than the recovery window. If not set, defaults to 14 days.
int32 recovery_window_days = 4;

// The encryption config can be specified to encrypt the
Expand Down Expand Up @@ -381,6 +381,31 @@ message Cluster {
style: DECLARATIVE_FRIENDLY
};

// Metadata related to network configuration.
message NetworkConfig {
// Required. The resource link for the VPC network in which cluster
// resources are created and from which they are accessible via Private IP.
// The network must belong to the same project as the cluster. It is
// specified in the form:
// "projects/{project_number}/global/networks/{network_id}". This is
// required to create a cluster.
string network = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "compute.googleapis.com/Network"
}
];

// Optional. Name of the allocated IP range for the private IP AlloyDB
// cluster, for example: "google-managed-services-default". If set, the
// instance IPs for this cluster will be created in the allocated range. The
// range name must comply with RFC 1035. Specifically, the name must be 1-63
// characters long and match the regular expression
// [a-z]([-a-z0-9]*[a-z0-9])?.
// Field name is intended to be consistent with CloudSQL.
string allocated_ip_range = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Configuration information for the secondary cluster. This should be set
// if and only if the cluster is of type SECONDARY.
message SecondaryConfig {
Expand Down Expand Up @@ -503,18 +528,21 @@ message Cluster {
// the cluster (i.e. `CreateCluster` vs. `CreateSecondaryCluster`
ClusterType cluster_type = 24 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The database engine major version. This is an output-only
// field and it's populated at the Cluster creation time. This field cannot be
// changed after cluster creation.
DatabaseVersion database_version = 9
[(google.api.field_behavior) = OUTPUT_ONLY];
// Optional. The database engine major version. This is an optional field and
// it is populated at the Cluster creation time. If a database version is not
// supplied at cluster creation time, then a default database version will
// be used.
DatabaseVersion database_version = 9 [(google.api.field_behavior) = OPTIONAL];

NetworkConfig network_config = 29 [(google.api.field_behavior) = OPTIONAL];

// Required. The resource link for the VPC network in which cluster resources
// are created and from which they are accessible via Private IP. The network
// must belong to the same project as the cluster. It is specified in the
// form: "projects/{project_number}/global/networks/{network_id}". This is
// required to create a cluster. It can be updated, but it cannot be removed.
// form: "projects/{project}/global/networks/{network_id}". This is required
// to create a cluster. Deprecated, use network_config.network instead.
string network = 10 [
deprecated = true,
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = { type: "compute.googleapis.com/Network" }
];
Expand Down Expand Up @@ -638,6 +666,16 @@ message Instance {
int32 node_count = 1;
}

// Client connection configuration
message ClientConnectionConfig {
// Optional. Configuration to enforce connectors only (ex: AuthProxy)
// connections to the database.
bool require_connectors = 1 [(google.api.field_behavior) = OPTIONAL];

// Optional. SSL config option for this instance.
SslConfig ssl_config = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Instance State
enum State {
// The state of the instance is unknown.
Expand Down Expand Up @@ -818,6 +856,10 @@ message Instance {
// This is distinct from labels.
// https://google.aip.dev/128
map<string, string> annotations = 18;

// Optional. Client connection specific configurations
ClientConnectionConfig client_connection_config = 23
[(google.api.field_behavior) = OPTIONAL];
}

// Message describing Backup object
Expand All @@ -828,6 +870,29 @@ message Backup {
style: DECLARATIVE_FRIENDLY
};

// A backup's position in a quantity-based retention queue, of backups with
// the same source cluster and type, with length, retention, specified by the
// backup's retention policy.
// Once the position is greater than the retention, the backup is eligible to
// be garbage collected.
//
// Example: 5 backups from the same source cluster and type with a
// quantity-based retention of 3 and denoted by backup_id (position,
// retention).
//
// Safe: backup_5 (1, 3), backup_4, (2, 3), backup_3 (3, 3).
// Awaiting garbage collection: backup_2 (4, 3), backup_1 (5, 3)
message QuantityBasedExpiry {
// Output only. The backup's position among its backups with the same source
// cluster and type, by descending chronological order create time(i.e.
// newest first).
int32 retention_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The length of the quantity-based queue, specified by the
// backup's retention policy.
int32 total_retention_count = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Backup State
enum State {
// The state of the backup is unknown.
Expand Down Expand Up @@ -950,6 +1015,18 @@ message Backup {
// added to the backup's create_time.
google.protobuf.Timestamp expiry_time = 19
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The QuantityBasedExpiry of the backup, specified by the
// backup's retention policy. Once the expiry quantity is over retention, the
// backup is eligible to be garbage collected.
QuantityBasedExpiry expiry_quantity = 20
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The database engine major version of the cluster this backup
// was created from. Any restored cluster created from this backup will have
// the same database version.
DatabaseVersion database_version = 22
[(google.api.field_behavior) = OUTPUT_ONLY];
}

// SupportedDatabaseFlag gives general information about a database flag,
Expand Down

0 comments on commit 1b6be64

Please sign in to comment.