Class: Google::Apis::AlloydbV1alpha::AutomatedBackupPolicy
- Inherits:
-
Object
- Object
- Google::Apis::AlloydbV1alpha::AutomatedBackupPolicy
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/alloydb_v1alpha/classes.rb,
lib/google/apis/alloydb_v1alpha/representations.rb,
lib/google/apis/alloydb_v1alpha/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::AlloydbV1alpha::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::AlloydbV1alpha::QuantityBasedRetention
A quantity based policy specifies that a certain number of the most recent successful backups should be retained.
-
#time_based_retention ⇒ Google::Apis::AlloydbV1alpha::TimeBasedRetention
A time based retention policy specifies that all backups within a certain time period should be retained.
-
#weekly_schedule ⇒ Google::Apis::AlloydbV1alpha::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.
130 131 132 |
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 130 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
82 83 84 |
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 82 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
87 88 89 |
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 87 def enabled @enabled end |
#encryption_config ⇒ Google::Apis::AlloydbV1alpha::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
94 95 96 |
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 94 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
99 100 101 |
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 99 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
106 107 108 |
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 106 def location @location end |
#quantity_based_retention ⇒ Google::Apis::AlloydbV1alpha::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
112 113 114 |
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 112 def quantity_based_retention @quantity_based_retention end |
#time_based_retention ⇒ Google::Apis::AlloydbV1alpha::TimeBasedRetention
A time based retention policy specifies that all backups within a certain time
period should be retained.
Corresponds to the JSON property timeBasedRetention
118 119 120 |
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 118 def time_based_retention @time_based_retention end |
#weekly_schedule ⇒ Google::Apis::AlloydbV1alpha::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
128 129 130 |
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 128 def weekly_schedule @weekly_schedule end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
135 136 137 138 139 140 141 142 143 144 |
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 135 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 |