Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(spanner): Add resource reference annotation to backup schedules #2093

Merged
merged 4 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ system-test/*key.json
.DS_Store
package-lock.json
__pycache__
.vscode
11 changes: 9 additions & 2 deletions protos/google/spanner/admin/database/v1/backup.proto
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,12 @@ message Backup {
// the list of all backup schedule URIs that are associated with creating
// this backup. If collapsing is not done, then this field captures the
// single backup schedule URI associated with creating this backup.
repeated string backup_schedules = 14
[(google.api.field_behavior) = OUTPUT_ONLY];
repeated string backup_schedules = 14 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.resource_reference) = {
type: "spanner.googleapis.com/BackupSchedule"
}
];

// Output only. Populated only for backups in an incremental backup chain.
// Backups share the same chain id if and only if they belong to the same
Expand Down Expand Up @@ -426,6 +430,7 @@ message ListBackupsRequest {
// * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
// * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
// * `size_bytes`
// * `backup_schedules`
//
// You can combine multiple expressions by enclosing each expression in
// parentheses. By default, expressions are combined with AND logic, but
Expand All @@ -444,6 +449,8 @@ message ListBackupsRequest {
// * `expire_time < \"2018-03-28T14:50:00Z\"`
// - The backup `expire_time` is before 2018-03-28T14:50:00Z.
// * `size_bytes > 10000000000` - The backup's size is greater than 10GB
// * `backup_schedules:daily`
// - The backup is created from a schedule with "daily" in its name.
string filter = 2;

// Number of backups to be returned in the response. If 0 or
Expand Down
265 changes: 203 additions & 62 deletions protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto

Large diffs are not rendered by default.

338 changes: 338 additions & 0 deletions protos/protos.d.ts

Large diffs are not rendered by default.

765 changes: 765 additions & 0 deletions protos/protos.js

Large diffs are not rendered by default.

81 changes: 80 additions & 1 deletion protos/protos.json

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

9 changes: 9 additions & 0 deletions src/v1/database_admin_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3073,6 +3073,7 @@ export class DatabaseAdminClient {
* * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
* * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
* * `size_bytes`
* * `backup_schedules`
*
* You can combine multiple expressions by enclosing each expression in
* parentheses. By default, expressions are combined with AND logic, but
Expand All @@ -3091,6 +3092,8 @@ export class DatabaseAdminClient {
* * `expire_time < \"2018-03-28T14:50:00Z\"`
* - The backup `expire_time` is before 2018-03-28T14:50:00Z.
* * `size_bytes > 10000000000` - The backup's size is greater than 10GB
* * `backup_schedules:daily`
* - The backup is created from a schedule with "daily" in its name.
* @param {number} request.pageSize
* Number of backups to be returned in the response. If 0 or
* less, defaults to the server's maximum allowed page size.
Expand Down Expand Up @@ -3214,6 +3217,7 @@ export class DatabaseAdminClient {
* * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
* * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
* * `size_bytes`
* * `backup_schedules`
*
* You can combine multiple expressions by enclosing each expression in
* parentheses. By default, expressions are combined with AND logic, but
Expand All @@ -3232,6 +3236,8 @@ export class DatabaseAdminClient {
* * `expire_time < \"2018-03-28T14:50:00Z\"`
* - The backup `expire_time` is before 2018-03-28T14:50:00Z.
* * `size_bytes > 10000000000` - The backup's size is greater than 10GB
* * `backup_schedules:daily`
* - The backup is created from a schedule with "daily" in its name.
* @param {number} request.pageSize
* Number of backups to be returned in the response. If 0 or
* less, defaults to the server's maximum allowed page size.
Expand Down Expand Up @@ -3303,6 +3309,7 @@ export class DatabaseAdminClient {
* * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
* * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
* * `size_bytes`
* * `backup_schedules`
*
* You can combine multiple expressions by enclosing each expression in
* parentheses. By default, expressions are combined with AND logic, but
Expand All @@ -3321,6 +3328,8 @@ export class DatabaseAdminClient {
* * `expire_time < \"2018-03-28T14:50:00Z\"`
* - The backup `expire_time` is before 2018-03-28T14:50:00Z.
* * `size_bytes > 10000000000` - The backup's size is greater than 10GB
* * `backup_schedules:daily`
* - The backup is created from a schedule with "daily" in its name.
* @param {number} request.pageSize
* Number of backups to be returned in the response. If 0 or
* less, defaults to the server's maximum allowed page size.
Expand Down
Loading
Loading