Skip to content

feat: Add samples for backup schedule feature APIs. #3339

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

Merged
merged 6 commits into from
Sep 25, 2024
Prev Previous commit
Next Next commit
Fix GetBackupSchedule and ListBackupSchedules method names.
  • Loading branch information
aman-19 committed Sep 19, 2024
commit 4218dc206516b7fc50dcfb4366300d4f33f2b9a9
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

class GetBackupScheduleSample {

static void GetBackupSchedule() throws IOException {
static void getBackupSchedule() throws IOException {
// TODO(developer): Replace these variables before running the sample.
String projectId = "my-project";
String instanceId = "my-instance";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

class ListBackupSchedulesSample {

static void ListBackupSchedules() throws IOException {
static void listBackupSchedules() throws IOException {
// TODO(developer): Replace these variables before running the sample.
String projectId = "my-project";
String instanceId = "my-instance";
Expand All @@ -47,8 +47,9 @@ static void listBackupSchedules(String projectId, String instanceId, String data
System.out.println(
String.format("Backup schedules for database '%s'", databaseName.toString()));
for (ListBackupSchedulesPage page : backupSchedules.iteratePages()) {
for (BackupSchedule backupSchedule : page.iterateAll())
for (BackupSchedule backupSchedule : page.iterateAll()) {
System.out.println(String.format("Backup schedule: %s", backupSchedule.getName()));
}
}
}
}
Expand Down