Class: Google::Apis::AlloydbV1beta::QuantityBasedExpiry
- Inherits:
-
Object
- Object
- Google::Apis::AlloydbV1beta::QuantityBasedExpiry
- 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
A backup's position in a quantity-based retention queue, of backups with the same source cluster and type, with length, retention, specified by the backup' s retention policy. Once the position is greater than the retention, the backup is eligible to be garbage collected. Example: 5 backups from the same source cluster and type with a quantity-based retention of 3 and denoted by backup_id (position, retention). Safe: backup_5 (1, 3), backup_4, (2, 3), backup_3 (3, 3). Awaiting garbage collection: backup_2 (4, 3), backup_1 (5, 3)
Instance Attribute Summary collapse
-
#retention_count ⇒ Fixnum
Output only.
-
#total_retention_count ⇒ Fixnum
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ QuantityBasedExpiry
constructor
A new instance of QuantityBasedExpiry.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ QuantityBasedExpiry
Returns a new instance of QuantityBasedExpiry.
2088 2089 2090 |
# File 'lib/google/apis/alloydb_v1beta/classes.rb', line 2088 def initialize(**args) update!(**args) end |
Instance Attribute Details
#retention_count ⇒ Fixnum
Output only. The backup's position among its backups with the same source
cluster and type, by descending chronological order create time(i.e. newest
first).
Corresponds to the JSON property retentionCount
2080 2081 2082 |
# File 'lib/google/apis/alloydb_v1beta/classes.rb', line 2080 def retention_count @retention_count end |
#total_retention_count ⇒ Fixnum
Output only. The length of the quantity-based queue, specified by the backup's
retention policy.
Corresponds to the JSON property totalRetentionCount
2086 2087 2088 |
# File 'lib/google/apis/alloydb_v1beta/classes.rb', line 2086 def total_retention_count @total_retention_count end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2093 2094 2095 2096 |
# File 'lib/google/apis/alloydb_v1beta/classes.rb', line 2093 def update!(**args) @retention_count = args[:retention_count] if args.key?(:retention_count) @total_retention_count = args[:total_retention_count] if args.key?(:total_retention_count) end |