Class: Google::Apis::AlloydbV1beta::AutomatedBackupPolicy
- Inherits:
-
Object
- Object
- Google::Apis::AlloydbV1beta::AutomatedBackupPolicy
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/alloydb_v1beta/classes.rb,
lib/google/apis/alloydb_v1beta/representations.rb,
lib/google/apis/alloydb_v1beta/representations.rb
Overview
Message describing the user-specified automated backup policy. All fields in the automated backup policy are optional. Defaults for each field are provided if they are not set.
Instance Attribute Summary collapse
-
#backup_window ⇒ String
The length of the time window during which a backup can be taken.
-
#enabled ⇒ Boolean
(also: #enabled?)
Whether automated automated backups are enabled.
-
#encryption_config ⇒ Google::Apis::AlloydbV1beta::EncryptionConfig
EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key).
-
#labels ⇒ Hash<String,String>
Labels to apply to backups created using this configuration.
-
#location ⇒ String
The location where the backup will be stored.
-
#quantity_based_retention ⇒ Google::Apis::AlloydbV1beta::QuantityBasedRetention
A quantity based policy specifies that a certain number of the most recent successful backups should be retained.
-
#time_based_retention ⇒ Google::Apis::AlloydbV1beta::TimeBasedRetention
A time based retention policy specifies that all backups within a certain time period should be retained.
-
#weekly_schedule ⇒ Google::Apis::AlloydbV1beta::WeeklySchedule
A weekly schedule starts a backup at prescribed start times within a day, for the specified days of the week.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AutomatedBackupPolicy
constructor
A new instance of AutomatedBackupPolicy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ AutomatedBackupPolicy
Returns a new instance of AutomatedBackupPolicy.
104 105 106 |
# File 'lib/google/apis/alloydb_v1beta/classes.rb', line 104 def initialize(**args) update!(**args) end |
Instance Attribute Details
#backup_window ⇒ String
The length of the time window during which a backup can be taken. If a backup
does not succeed within this time window, it will be canceled and considered
failed. The backup window must be at least 5 minutes long. There is no upper
bound on the window. If not set, it defaults to 1 hour.
Corresponds to the JSON property backupWindow
56 57 58 |
# File 'lib/google/apis/alloydb_v1beta/classes.rb', line 56 def backup_window @backup_window end |
#enabled ⇒ Boolean Also known as: enabled?
Whether automated automated backups are enabled. If not set, defaults to true.
Corresponds to the JSON property enabled
61 62 63 |
# File 'lib/google/apis/alloydb_v1beta/classes.rb', line 61 def enabled @enabled end |
#encryption_config ⇒ Google::Apis::AlloydbV1beta::EncryptionConfig
EncryptionConfig describes the encryption config of a cluster or a backup that
is encrypted with a CMEK (customer-managed encryption key).
Corresponds to the JSON property encryptionConfig
68 69 70 |
# File 'lib/google/apis/alloydb_v1beta/classes.rb', line 68 def encryption_config @encryption_config end |
#labels ⇒ Hash<String,String>
Labels to apply to backups created using this configuration.
Corresponds to the JSON property labels
73 74 75 |
# File 'lib/google/apis/alloydb_v1beta/classes.rb', line 73 def labels @labels end |
#location ⇒ String
The location where the backup will be stored. Currently, the only supported
option is to store the backup in the same region as the cluster. If empty,
defaults to the region of the cluster.
Corresponds to the JSON property location
80 81 82 |
# File 'lib/google/apis/alloydb_v1beta/classes.rb', line 80 def location @location end |
#quantity_based_retention ⇒ Google::Apis::AlloydbV1beta::QuantityBasedRetention
A quantity based policy specifies that a certain number of the most recent
successful backups should be retained.
Corresponds to the JSON property quantityBasedRetention
86 87 88 |
# File 'lib/google/apis/alloydb_v1beta/classes.rb', line 86 def quantity_based_retention @quantity_based_retention end |
#time_based_retention ⇒ Google::Apis::AlloydbV1beta::TimeBasedRetention
A time based retention policy specifies that all backups within a certain time
period should be retained.
Corresponds to the JSON property timeBasedRetention
92 93 94 |
# File 'lib/google/apis/alloydb_v1beta/classes.rb', line 92 def time_based_retention @time_based_retention end |
#weekly_schedule ⇒ Google::Apis::AlloydbV1beta::WeeklySchedule
A weekly schedule starts a backup at prescribed start times within a day, for
the specified days of the week. The weekly schedule message is flexible and
can be used to create many types of schedules. For example, to have a daily
backup that starts at 22:00, configure the start_times
field to have one
element "22:00" and the days_of_week
field to have all seven days of the
week.
Corresponds to the JSON property weeklySchedule
102 103 104 |
# File 'lib/google/apis/alloydb_v1beta/classes.rb', line 102 def weekly_schedule @weekly_schedule end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
109 110 111 112 113 114 115 116 117 118 |
# File 'lib/google/apis/alloydb_v1beta/classes.rb', line 109 def update!(**args) @backup_window = args[:backup_window] if args.key?(:backup_window) @enabled = args[:enabled] if args.key?(:enabled) @encryption_config = args[:encryption_config] if args.key?(:encryption_config) @labels = args[:labels] if args.key?(:labels) @location = args[:location] if args.key?(:location) @quantity_based_retention = args[:quantity_based_retention] if args.key?(:quantity_based_retention) @time_based_retention = args[:time_based_retention] if args.key?(:time_based_retention) @weekly_schedule = args[:weekly_schedule] if args.key?(:weekly_schedule) end |