public sealed class Backup.Types.QuantityBasedExpiry : IMessage<Backup.Types.QuantityBasedExpiry>, IEquatable<Backup.Types.QuantityBasedExpiry>, IDeepCloneable<Backup.Types.QuantityBasedExpiry>, IBufferMessage, IMessage
Reference documentation and code samples for the AlloyDB v1 API class Backup.Types.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).
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).
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis documentation covers the \u003ccode\u003eBackup.Types.QuantityBasedExpiry\u003c/code\u003e class within the Google Cloud AlloyDB v1 API, detailing its role in managing backup retention.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eQuantityBasedExpiry\u003c/code\u003e class defines how backups are managed in a quantity-based retention queue, indicating their position and eligibility for garbage collection.\u003c/p\u003e\n"],["\u003cp\u003eThere are multiple versions of the \u003ccode\u003eGoogle.Cloud.AlloyDb.V1\u003c/code\u003e package available, ranging from version 1.0.0 to the latest version 1.9.0, each accessible through separate documentation links.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eQuantityBasedExpiry\u003c/code\u003e implements interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, indicating its functionality for data handling and comparison.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes properties \u003ccode\u003eRetentionCount\u003c/code\u003e which represents the backups position, and \u003ccode\u003eTotalRetentionCount\u003c/code\u003e which specifies the queue's length, both related to managing the number of backups kept.\u003c/p\u003e\n"]]],[],null,["# AlloyDB v1 API - Class Backup.Types.QuantityBasedExpiry (1.11.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.11.0 (latest)](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1.Backup.Types.QuantityBasedExpiry)\n- [1.10.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.10.0/Google.Cloud.AlloyDb.V1.Backup.Types.QuantityBasedExpiry)\n- [1.9.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.9.0/Google.Cloud.AlloyDb.V1.Backup.Types.QuantityBasedExpiry)\n- [1.8.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.8.0/Google.Cloud.AlloyDb.V1.Backup.Types.QuantityBasedExpiry)\n- [1.7.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.7.0/Google.Cloud.AlloyDb.V1.Backup.Types.QuantityBasedExpiry)\n- [1.6.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.6.0/Google.Cloud.AlloyDb.V1.Backup.Types.QuantityBasedExpiry)\n- [1.5.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.5.0/Google.Cloud.AlloyDb.V1.Backup.Types.QuantityBasedExpiry)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.4.0/Google.Cloud.AlloyDb.V1.Backup.Types.QuantityBasedExpiry)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.3.0/Google.Cloud.AlloyDb.V1.Backup.Types.QuantityBasedExpiry)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.2.0/Google.Cloud.AlloyDb.V1.Backup.Types.QuantityBasedExpiry)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.1.0/Google.Cloud.AlloyDb.V1.Backup.Types.QuantityBasedExpiry)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.0.0/Google.Cloud.AlloyDb.V1.Backup.Types.QuantityBasedExpiry) \n\n public sealed class Backup.Types.QuantityBasedExpiry : IMessage\u003cBackup.Types.QuantityBasedExpiry\u003e, IEquatable\u003cBackup.Types.QuantityBasedExpiry\u003e, IDeepCloneable\u003cBackup.Types.QuantityBasedExpiry\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the AlloyDB v1 API class Backup.Types.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\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\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\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Backup.Types.QuantityBasedExpiry \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Backup](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1.Backup)[Types](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1.Backup.Types)[QuantityBasedExpiry](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1.Backup.Types.QuantityBasedExpiry), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Backup](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1.Backup)[Types](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1.Backup.Types)[QuantityBasedExpiry](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1.Backup.Types.QuantityBasedExpiry), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Backup](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1.Backup)[Types](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1.Backup.Types)[QuantityBasedExpiry](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1.Backup.Types.QuantityBasedExpiry), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.AlloyDb.V1](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.AlloyDb.V1.dll\n\nConstructors\n------------\n\n### QuantityBasedExpiry()\n\n public QuantityBasedExpiry()\n\n### QuantityBasedExpiry(QuantityBasedExpiry)\n\n public QuantityBasedExpiry(Backup.Types.QuantityBasedExpiry other)\n\nProperties\n----------\n\n### RetentionCount\n\n public int RetentionCount { get; set; }\n\nOutput only. The backup's position among its backups with the same source\ncluster and type, by descending chronological order create time(i.e.\nnewest first).\n\n### TotalRetentionCount\n\n public int TotalRetentionCount { get; set; }\n\nOutput only. The length of the quantity-based queue, specified by the\nbackup's retention policy."]]