Class: Fog::Google::SQL::BackupRuns
- Inherits:
-
Collection
- Object
- Collection
- Fog::Google::SQL::BackupRuns
- Defined in:
- lib/fog/google/models/sql/backup_runs.rb
Instance Method Summary collapse
-
#all(instance_id, backup_configuration_id) ⇒ Array<Fog::Google::SQL::BackupRun>
Lists all backup runs associated with a given instance and configuration.
-
#get(instance_id, backup_configuration_id, due_time) ⇒ Fog::Google::SQL::BackupRun
Retrieves a resource containing information about a backup run.
Instance Method Details
#all(instance_id, backup_configuration_id) ⇒ Array<Fog::Google::SQL::BackupRun>
Lists all backup runs associated with a given instance and configuration
16 17 18 19 |
# File 'lib/fog/google/models/sql/backup_runs.rb', line 16 def all(instance_id, backup_configuration_id) data = service.list_backup_runs(instance_id, backup_configuration_id).body['items'] || [] load(data) end |
#get(instance_id, backup_configuration_id, due_time) ⇒ Fog::Google::SQL::BackupRun
Retrieves a resource containing information about a backup run
28 29 30 31 32 33 34 |
# File 'lib/fog/google/models/sql/backup_runs.rb', line 28 def get(instance_id, backup_configuration_id, due_time) if backup_run = service.get_backup_run(instance_id, backup_configuration_id, due_time).body new(backup_run) end rescue Fog::Errors::NotFound nil end |