Google Cloud AlloyDB for PostgreSQL V1 Client - Class AutomatedBackupPolicy (0.2.1)

Reference documentation and code samples for the Google Cloud AlloyDB for PostgreSQL V1 Client 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.

Generated from protobuf message google.cloud.alloydb.v1.AutomatedBackupPolicy

Namespace

Google \ Cloud \ AlloyDb \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ weekly_schedule Google\Cloud\AlloyDb\V1\AutomatedBackupPolicy\WeeklySchedule

Weekly schedule for the Backup.

↳ time_based_retention Google\Cloud\AlloyDb\V1\AutomatedBackupPolicy\TimeBasedRetention

Time-based Backup retention policy.

↳ quantity_based_retention Google\Cloud\AlloyDb\V1\AutomatedBackupPolicy\QuantityBasedRetention

Quantity-based Backup retention policy to retain recent backups.

↳ enabled bool

Whether automated automated backups are enabled. If not set, defaults to true.

↳ backup_window Google\Protobuf\Duration

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.

↳ encryption_config Google\Cloud\AlloyDb\V1\EncryptionConfig

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 then use default encryption scheme to protect the user data.

↳ 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.

↳ labels array|Google\Protobuf\Internal\MapField

Labels to apply to backups created using this configuration.

getWeeklySchedule

Weekly schedule for the Backup.

Returns
TypeDescription
Google\Cloud\AlloyDb\V1\AutomatedBackupPolicy\WeeklySchedule|null

hasWeeklySchedule

setWeeklySchedule

Weekly schedule for the Backup.

Parameter
NameDescription
var Google\Cloud\AlloyDb\V1\AutomatedBackupPolicy\WeeklySchedule
Returns
TypeDescription
$this

getTimeBasedRetention

Time-based Backup retention policy.

Returns
TypeDescription
Google\Cloud\AlloyDb\V1\AutomatedBackupPolicy\TimeBasedRetention|null

hasTimeBasedRetention

setTimeBasedRetention

Time-based Backup retention policy.

Parameter
NameDescription
var Google\Cloud\AlloyDb\V1\AutomatedBackupPolicy\TimeBasedRetention
Returns
TypeDescription
$this

getQuantityBasedRetention

Quantity-based Backup retention policy to retain recent backups.

Returns
TypeDescription
Google\Cloud\AlloyDb\V1\AutomatedBackupPolicy\QuantityBasedRetention|null

hasQuantityBasedRetention

setQuantityBasedRetention

Quantity-based Backup retention policy to retain recent backups.

Parameter
NameDescription
var Google\Cloud\AlloyDb\V1\AutomatedBackupPolicy\QuantityBasedRetention
Returns
TypeDescription
$this

getEnabled

Whether automated automated backups are enabled. If not set, defaults to true.

Returns
TypeDescription
bool

hasEnabled

clearEnabled

setEnabled

Whether automated automated backups are enabled. If not set, defaults to true.

Parameter
NameDescription
var bool
Returns
TypeDescription
$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.

Returns
TypeDescription
Google\Protobuf\Duration|null

hasBackupWindow

clearBackupWindow

setBackupWindow

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.

Parameter
NameDescription
var Google\Protobuf\Duration
Returns
TypeDescription
$this

getEncryptionConfig

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 then use default encryption scheme to protect the user data.

Returns
TypeDescription
Google\Cloud\AlloyDb\V1\EncryptionConfig|null

hasEncryptionConfig

clearEncryptionConfig

setEncryptionConfig

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 then use default encryption scheme to protect the user data.

Parameter
NameDescription
var Google\Cloud\AlloyDb\V1\EncryptionConfig
Returns
TypeDescription
$this

getLocation

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.

Returns
TypeDescription
string

setLocation

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.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getLabels

Labels to apply to backups created using this configuration.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setLabels

Labels to apply to backups created using this configuration.

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getSchedule

Returns
TypeDescription
string

getRetention

Returns
TypeDescription
string