Skip to content

Commit

Permalink
chore(Spanner): Use resource name overloads where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
amanda-tarafa committed Sep 27, 2024
1 parent b5d117e commit cd8d8ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions spanner/api/Spanner.Samples/DeleteBackupSchedule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ public void DeleteBackupSchedule(string projectId, string instanceId, string dat
{
DatabaseAdminClient client = DatabaseAdminClient.Create();

client.DeleteBackupSchedule(
new DeleteBackupScheduleRequest
{
BackupScheduleName = BackupScheduleName.FromProjectInstanceDatabaseSchedule(projectId, instanceId, databaseId, scheduleId),
});
client.DeleteBackupSchedule(BackupScheduleName.FromProjectInstanceDatabaseSchedule(projectId, instanceId, databaseId, scheduleId));

Console.WriteLine("Deleted backup schedule");
}
Expand Down
6 changes: 1 addition & 5 deletions spanner/api/Spanner.Samples/GetBackupSchedule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ public BackupSchedule GetBackupSchedule(string projectId, string instanceId, str
{
DatabaseAdminClient client = DatabaseAdminClient.Create();

BackupSchedule response = client.GetBackupSchedule(
new GetBackupScheduleRequest
{
BackupScheduleName = BackupScheduleName.FromProjectInstanceDatabaseSchedule(projectId, instanceId, databaseId, scheduleId),
});
BackupSchedule response = client.GetBackupSchedule(BackupScheduleName.FromProjectInstanceDatabaseSchedule(projectId, instanceId, databaseId, scheduleId));

Console.WriteLine($"Backup schedule: {response}");
return response;
Expand Down

0 comments on commit cd8d8ec

Please sign in to comment.