Class: Google::Apis::SqladminV1beta4::BackupRetentionSettings

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/sqladmin_v1beta4/classes.rb,
generated/google/apis/sqladmin_v1beta4/representations.rb,
generated/google/apis/sqladmin_v1beta4/representations.rb

Overview

We currently only support backup retention by specifying the number of backups we will retain.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ BackupRetentionSettings

Returns a new instance of BackupRetentionSettings.



205
206
207
# File 'generated/google/apis/sqladmin_v1beta4/classes.rb', line 205

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#retained_backupsFixnum

Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is 'COUNT', we will retain this many backups. Corresponds to the JSON property retainedBackups

Returns:

  • (Fixnum)


198
199
200
# File 'generated/google/apis/sqladmin_v1beta4/classes.rb', line 198

def retained_backups
  @retained_backups
end

#retention_unitString

The unit that 'retained_backups' represents. Corresponds to the JSON property retentionUnit

Returns:

  • (String)


203
204
205
# File 'generated/google/apis/sqladmin_v1beta4/classes.rb', line 203

def retention_unit
  @retention_unit
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



210
211
212
213
# File 'generated/google/apis/sqladmin_v1beta4/classes.rb', line 210

def update!(**args)
  @retained_backups = args[:retained_backups] if args.key?(:retained_backups)
  @retention_unit = args[:retention_unit] if args.key?(:retention_unit)
end