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.
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.
↳ location
string
The location where the backup will be stored. Currently, the only supported option is to store the backup in the same region as the cluster. If empty, defaults to the region of the cluster.
Whether automated automated backups are enabled. If not set, defaults to
true.
Returns
Type
Description
bool
hasEnabled
clearEnabled
setEnabled
Whether automated automated backups are enabled. If not set, defaults to
true.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getBackupWindow
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.
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.
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.
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"]],[["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,["# Google Cloud AlloyDB for PostgreSQL V1 Client - Class AutomatedBackupPolicy (1.4.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.4.1 (latest)](/php/docs/reference/cloud-alloydb/latest/V1.AutomatedBackupPolicy)\n- [1.4.0](/php/docs/reference/cloud-alloydb/1.4.0/V1.AutomatedBackupPolicy)\n- [1.3.0](/php/docs/reference/cloud-alloydb/1.3.0/V1.AutomatedBackupPolicy)\n- [1.2.0](/php/docs/reference/cloud-alloydb/1.2.0/V1.AutomatedBackupPolicy)\n- [1.1.3](/php/docs/reference/cloud-alloydb/1.1.3/V1.AutomatedBackupPolicy)\n- [1.0.0](/php/docs/reference/cloud-alloydb/1.0.0/V1.AutomatedBackupPolicy)\n- [0.10.3](/php/docs/reference/cloud-alloydb/0.10.3/V1.AutomatedBackupPolicy)\n- [0.9.0](/php/docs/reference/cloud-alloydb/0.9.0/V1.AutomatedBackupPolicy)\n- [0.8.0](/php/docs/reference/cloud-alloydb/0.8.0/V1.AutomatedBackupPolicy)\n- [0.7.1](/php/docs/reference/cloud-alloydb/0.7.1/V1.AutomatedBackupPolicy)\n- [0.6.0](/php/docs/reference/cloud-alloydb/0.6.0/V1.AutomatedBackupPolicy)\n- [0.5.0](/php/docs/reference/cloud-alloydb/0.5.0/V1.AutomatedBackupPolicy)\n- [0.4.0](/php/docs/reference/cloud-alloydb/0.4.0/V1.AutomatedBackupPolicy)\n- [0.3.0](/php/docs/reference/cloud-alloydb/0.3.0/V1.AutomatedBackupPolicy)\n- [0.2.1](/php/docs/reference/cloud-alloydb/0.2.1/V1.AutomatedBackupPolicy)\n- [0.1.3](/php/docs/reference/cloud-alloydb/0.1.3/V1.AutomatedBackupPolicy) \nReference documentation and code samples for the Google Cloud AlloyDB for PostgreSQL V1 Client 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\nGenerated from protobuf message `google.cloud.alloydb.v1.AutomatedBackupPolicy`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ AlloyDb \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getWeeklySchedule\n\nWeekly schedule for the Backup.\n\n### hasWeeklySchedule\n\n### setWeeklySchedule\n\nWeekly schedule for the Backup.\n\n### getTimeBasedRetention\n\nTime-based Backup retention policy.\n\n### hasTimeBasedRetention\n\n### setTimeBasedRetention\n\nTime-based Backup retention policy.\n\n### getQuantityBasedRetention\n\nQuantity-based Backup retention policy to retain recent backups.\n\n### hasQuantityBasedRetention\n\n### setQuantityBasedRetention\n\nQuantity-based Backup retention policy to retain recent backups.\n\n### getEnabled\n\nWhether automated automated backups are enabled. If not set, defaults to\ntrue.\n\n### hasEnabled\n\n### clearEnabled\n\n### setEnabled\n\nWhether automated automated backups are enabled. If not set, defaults to\ntrue.\n\n### getBackupWindow\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### hasBackupWindow\n\n### clearBackupWindow\n\n### setBackupWindow\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### getEncryptionConfig\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### hasEncryptionConfig\n\n### clearEncryptionConfig\n\n### setEncryptionConfig\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### getLocation\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### setLocation\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### getLabels\n\nLabels to apply to backups created using this configuration.\n\n### setLabels\n\nLabels to apply to backups created using this configuration.\n\n### getSchedule\n\n### getRetention"]]