Class: Google::Apis::AlloydbV1::AutomatedBackupPolicy
- Inherits:
-
Object
- Object
- Google::Apis::AlloydbV1::AutomatedBackupPolicy
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/alloydb_v1/classes.rb,
lib/google/apis/alloydb_v1/representations.rb,
lib/google/apis/alloydb_v1/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::AlloydbV1::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::AlloydbV1::QuantityBasedRetention
A quantity based policy specifies that a certain number of the most recent successful backups should be retained.
-
#time_based_retention ⇒ Google::Apis::AlloydbV1::TimeBasedRetention
A time based retention policy specifies that all backups within a certain time period should be retained.
-
#weekly_schedule ⇒ Google::Apis::AlloydbV1::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.
127 128 129 |
# File 'lib/google/apis/alloydb_v1/classes.rb', line 127 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
79 80 81 |
# File 'lib/google/apis/alloydb_v1/classes.rb', line 79 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
84 85 86 |
# File 'lib/google/apis/alloydb_v1/classes.rb', line 84 def enabled @enabled end |
#encryption_config ⇒ Google::Apis::AlloydbV1::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
91 92 93 |
# File 'lib/google/apis/alloydb_v1/classes.rb', line 91 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
96 97 98 |
# File 'lib/google/apis/alloydb_v1/classes.rb', line 96 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
103 104 105 |
# File 'lib/google/apis/alloydb_v1/classes.rb', line 103 def location @location end |
#quantity_based_retention ⇒ Google::Apis::AlloydbV1::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
109 110 111 |
# File 'lib/google/apis/alloydb_v1/classes.rb', line 109 def quantity_based_retention @quantity_based_retention end |
#time_based_retention ⇒ Google::Apis::AlloydbV1::TimeBasedRetention
A time based retention policy specifies that all backups within a certain time
period should be retained.
Corresponds to the JSON property timeBasedRetention
115 116 117 |
# File 'lib/google/apis/alloydb_v1/classes.rb', line 115 def time_based_retention @time_based_retention end |
#weekly_schedule ⇒ Google::Apis::AlloydbV1::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
125 126 127 |
# File 'lib/google/apis/alloydb_v1/classes.rb', line 125 def weekly_schedule @weekly_schedule end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
132 133 134 135 136 137 138 139 140 141 |
# File 'lib/google/apis/alloydb_v1/classes.rb', line 132 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 |