public sealed class AutomatedBackupPolicy : IMessage<AutomatedBackupPolicy>, IEquatable<AutomatedBackupPolicy>, IDeepCloneable<AutomatedBackupPolicy>, IBufferMessage, IMessage
Reference documentation and code samples for the AlloyDB v1beta 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 v1beta API allows users to configure automated backup settings for their AlloyDB instances.\u003c/p\u003e\n"],["\u003cp\u003eBackups can be configured with a specific \u003ccode\u003eBackupWindow\u003c/code\u003e, which defines the duration during which a backup can be taken, defaulting to 1 hour if not set and must be at least 5 minutes long.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides options to enable or disable automated backups via the \u003ccode\u003eEnabled\u003c/code\u003e property, with backups enabled by default.\u003c/p\u003e\n"],["\u003cp\u003eUsers can specify encryption configurations for backups using the \u003ccode\u003eEncryptionConfig\u003c/code\u003e property, defaulting to the standard encryption scheme if not set.\u003c/p\u003e\n"],["\u003cp\u003eBackup retention can be managed through quantity-based (\u003ccode\u003eQuantityBasedRetention\u003c/code\u003e) or time-based (\u003ccode\u003eTimeBasedRetention\u003c/code\u003e) policies, and backups can have a \u003ccode\u003eWeeklySchedule\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# AlloyDB v1beta API - Class AutomatedBackupPolicy (1.0.0-beta12)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta12 (latest)](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1Beta/latest/Google.Cloud.AlloyDb.V1Beta.AutomatedBackupPolicy)\n- [1.0.0-beta11](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1Beta/1.0.0-beta11/Google.Cloud.AlloyDb.V1Beta.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 v1beta 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.V1Beta/latest/Google.Cloud.AlloyDb.V1Beta.AutomatedBackupPolicy), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[AutomatedBackupPolicy](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1Beta/latest/Google.Cloud.AlloyDb.V1Beta.AutomatedBackupPolicy), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[AutomatedBackupPolicy](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1Beta/latest/Google.Cloud.AlloyDb.V1Beta.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.V1Beta](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1Beta/latest/Google.Cloud.AlloyDb.V1Beta)\n\nAssembly\n--------\n\nGoogle.Cloud.AlloyDb.V1Beta.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."]]