Class: Google::Apis::BackupdrV1::BackupRule

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

Overview

BackupRule binds the backup schedule to a retention policy.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ BackupRule

Returns a new instance of BackupRule.



1017
1018
1019
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1017

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

Instance Attribute Details

#backup_retention_daysFixnum

Required. Configures the duration for which backup data will be kept. It is defined in “days”. The value should be greater than or equal to minimum enforced retention of the backup vault. Minimum value is 1 and maximum value is 90 for hourly backups. Minimum value is 1 and maximum value is 90 for daily backups. Minimum value is 7 and maximum value is 186 for weekly backups. Minimum value is 30 and maximum value is 732 for monthly backups. Minimum value is 365 and maximum value is 36159 for yearly backups. Corresponds to the JSON property backupRetentionDays

Returns:

  • (Fixnum)


1000
1001
1002
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1000

def backup_retention_days
  @backup_retention_days
end

#rule_idString

Required. Immutable. The unique id of this BackupRule. The rule_id is unique per BackupPlan.The rule_id must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, /a-z,62 /. Corresponds to the JSON property ruleId

Returns:

  • (String)


1008
1009
1010
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1008

def rule_id
  @rule_id
end

#standard_scheduleGoogle::Apis::BackupdrV1::StandardSchedule

StandardSchedule defines a schedule that run within the confines of a defined window of days. We can define recurrence type for schedule as HOURLY, DAILY, WEEKLY, MONTHLY or YEARLY. Corresponds to the JSON property standardSchedule



1015
1016
1017
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1015

def standard_schedule
  @standard_schedule
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1022
1023
1024
1025
1026
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1022

def update!(**args)
  @backup_retention_days = args[:backup_retention_days] if args.key?(:backup_retention_days)
  @rule_id = args[:rule_id] if args.key?(:rule_id)
  @standard_schedule = args[:standard_schedule] if args.key?(:standard_schedule)
end