public sealed class AutomatedBackupPolicy : IMessage<AutomatedBackupPolicy>, IEquatable<AutomatedBackupPolicy>, IDeepCloneable<AutomatedBackupPolicy>, IBufferMessage, IMessage
Reference documentation and code samples for the AlloyDB v1 API class AutomatedBackupPolicy.
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.
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.
public EncryptionConfig EncryptionConfig { get; set; }
Optional. The encryption config can be specified to encrypt the
backups with a customer-managed encryption key (CMEK). When this field is
not specified, the backup will use the cluster's encryption config.
[[["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\u003eThe \u003ccode\u003eAutomatedBackupPolicy\u003c/code\u003e class in the Google.Cloud.AlloyDb.V1 API provides a way to define user-specified automated backup settings for AlloyDB instances.\u003c/p\u003e\n"],["\u003cp\u003eThis class allows for customization of backup behavior, including enabling/disabling backups, setting a backup window, and specifying encryption configurations.\u003c/p\u003e\n"],["\u003cp\u003eBackups can be stored in the same region as the cluster and support retention policies based on either quantity or time, along with a weekly backup schedule option.\u003c/p\u003e\n"],["\u003cp\u003eThe class implements interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, and \u003ccode\u003eIDeepCloneable\u003c/code\u003e, making it compatible with various Protobuf and .NET functionalities.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the AutomatedBackupPolicy is \u003ccode\u003e1.9.0\u003c/code\u003e, with previous versions available back to \u003ccode\u003e1.0.0\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# AlloyDB v1 API - Class AutomatedBackupPolicy (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.AutomatedBackupPolicy)\n- [1.10.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.10.0/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy)\n- [1.9.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.9.0/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy)\n- [1.8.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.8.0/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy)\n- [1.7.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.7.0/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy)\n- [1.6.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.6.0/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy)\n- [1.5.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.5.0/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.4.0/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.3.0/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.2.0/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.1.0/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.0.0/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy) \n\n public sealed class AutomatedBackupPolicy : IMessage\u003cAutomatedBackupPolicy\u003e, IEquatable\u003cAutomatedBackupPolicy\u003e, IDeepCloneable\u003cAutomatedBackupPolicy\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the AlloyDB v1 API class AutomatedBackupPolicy.\n\nMessage describing the user-specified automated backup policy.\n\nAll fields in the automated backup policy are optional. Defaults for each\nfield are provided if they are not set. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e AutomatedBackupPolicy \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[AutomatedBackupPolicy](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[AutomatedBackupPolicy](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[AutomatedBackupPolicy](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy), [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### AutomatedBackupPolicy()\n\n public AutomatedBackupPolicy()\n\n### AutomatedBackupPolicy(AutomatedBackupPolicy)\n\n public AutomatedBackupPolicy(AutomatedBackupPolicy other)\n\nProperties\n----------\n\n### BackupWindow\n\n public Duration BackupWindow { get; set; }\n\nThe length of the time window during which a backup can be\ntaken. If a backup does not succeed within this time window, it will be\ncanceled and considered failed.\n\nThe backup window must be at least 5 minutes long. There is no upper bound\non the window. If not set, it defaults to 1 hour.\n\n### Enabled\n\n public bool Enabled { get; set; }\n\nWhether automated automated backups are enabled. If not set, defaults to\ntrue.\n\n### EncryptionConfig\n\n public EncryptionConfig EncryptionConfig { get; set; }\n\nOptional. The encryption config can be specified to encrypt the\nbackups with a customer-managed encryption key (CMEK). When this field is\nnot specified, the backup will use the cluster's encryption config.\n\n### HasEnabled\n\n public bool HasEnabled { get; }\n\nGets whether the \"enabled\" field is set\n\n### Labels\n\n public MapField\u003cstring, string\u003e Labels { get; }\n\nLabels to apply to backups created using this configuration.\n\n### Location\n\n public string Location { get; set; }\n\nThe location where the backup will be stored. Currently, the only supported\noption is to store the backup in the same region as the cluster.\n\nIf empty, defaults to the region of the cluster.\n\n### QuantityBasedRetention\n\n public AutomatedBackupPolicy.Types.QuantityBasedRetention QuantityBasedRetention { get; set; }\n\nQuantity-based Backup retention policy to retain recent backups.\n\n### RetentionCase\n\n public AutomatedBackupPolicy.RetentionOneofCase RetentionCase { get; }\n\n### ScheduleCase\n\n public AutomatedBackupPolicy.ScheduleOneofCase ScheduleCase { get; }\n\n### TimeBasedRetention\n\n public AutomatedBackupPolicy.Types.TimeBasedRetention TimeBasedRetention { get; set; }\n\nTime-based Backup retention policy.\n\n### WeeklySchedule\n\n public AutomatedBackupPolicy.Types.WeeklySchedule WeeklySchedule { get; set; }\n\nWeekly schedule for the Backup."]]