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.
154 155 156 |
# File 'lib/google/apis/alloydb_v1beta/classes.rb', line 154 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
106 107 108 |
# File 'lib/google/apis/alloydb_v1beta/classes.rb', line 106 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
111 112 113 |
# File 'lib/google/apis/alloydb_v1beta/classes.rb', line 111 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
118 119 120 |
# File 'lib/google/apis/alloydb_v1beta/classes.rb', line 118 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
123 124 125 |
# File 'lib/google/apis/alloydb_v1beta/classes.rb', line 123 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
130 131 132 |
# File 'lib/google/apis/alloydb_v1beta/classes.rb', line 130 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
136 137 138 |
# File 'lib/google/apis/alloydb_v1beta/classes.rb', line 136 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
142 143 144 |
# File 'lib/google/apis/alloydb_v1beta/classes.rb', line 142 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
152 153 154 |
# File 'lib/google/apis/alloydb_v1beta/classes.rb', line 152 def weekly_schedule @weekly_schedule end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
159 160 161 162 163 164 165 166 167 168 |
# File 'lib/google/apis/alloydb_v1beta/classes.rb', line 159 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 |