Reference documentation and code samples for the AlloyDB V1ALPHA API class Google::Cloud::AlloyDB::V1alpha::Backup::QuantityBasedExpiry.
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).
(::Integer) — 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).
#total_retention_count
deftotal_retention_count()->::Integer
Returns
(::Integer) — Output only. The length of the quantity-based queue, specified by the
backup's retention policy.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# AlloyDB V1ALPHA API - Class Google::Cloud::AlloyDB::V1alpha::Backup::QuantityBasedExpiry (v0.14.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.14.1 (latest)](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/latest/Google-Cloud-AlloyDB-V1alpha-Backup-QuantityBasedExpiry)\n- [0.14.0](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.14.0/Google-Cloud-AlloyDB-V1alpha-Backup-QuantityBasedExpiry)\n- [0.13.0](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.13.0/Google-Cloud-AlloyDB-V1alpha-Backup-QuantityBasedExpiry)\n- [0.12.0](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.12.0/Google-Cloud-AlloyDB-V1alpha-Backup-QuantityBasedExpiry)\n- [0.11.1](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.11.1/Google-Cloud-AlloyDB-V1alpha-Backup-QuantityBasedExpiry)\n- [0.10.0](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.10.0/Google-Cloud-AlloyDB-V1alpha-Backup-QuantityBasedExpiry)\n- [0.9.0](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.9.0/Google-Cloud-AlloyDB-V1alpha-Backup-QuantityBasedExpiry)\n- [0.8.0](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.8.0/Google-Cloud-AlloyDB-V1alpha-Backup-QuantityBasedExpiry)\n- [0.7.2](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.7.2/Google-Cloud-AlloyDB-V1alpha-Backup-QuantityBasedExpiry)\n- [0.6.0](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.6.0/Google-Cloud-AlloyDB-V1alpha-Backup-QuantityBasedExpiry)\n- [0.5.2](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.5.2/Google-Cloud-AlloyDB-V1alpha-Backup-QuantityBasedExpiry)\n- [0.4.0](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.4.0/Google-Cloud-AlloyDB-V1alpha-Backup-QuantityBasedExpiry)\n- [0.3.0](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.3.0/Google-Cloud-AlloyDB-V1alpha-Backup-QuantityBasedExpiry)\n- [0.2.0](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.2.0/Google-Cloud-AlloyDB-V1alpha-Backup-QuantityBasedExpiry)\n- [0.1.0](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.1.0/Google-Cloud-AlloyDB-V1alpha-Backup-QuantityBasedExpiry) \nReference documentation and code samples for the AlloyDB V1ALPHA API class Google::Cloud::AlloyDB::V1alpha::Backup::QuantityBasedExpiry.\n\nA backup's position in a quantity-based retention queue, of backups with\nthe same source cluster and type, with length, retention, specified by the\nbackup's retention policy.\nOnce the position is greater than the retention, the backup is eligible to\nbe garbage collected.\n\n\nExample: 5 backups from the same source cluster and type with a\nquantity-based retention of 3 and denoted by backup_id (position,\nretention).\n\n\u003cbr /\u003e\n\nSafe: backup_5 (1, 3), backup_4, (2, 3), backup_3 (3, 3).\nAwaiting garbage collection: backup_2 (4, 3), backup_1 (5, 3) \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #retention_count\n\n def retention_count() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- 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).\n\n### #total_retention_count\n\n def total_retention_count() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- Output only. The length of the quantity-based queue, specified by the backup's retention policy."]]