Compute V1 Client - Class ResourcePolicySnapshotSchedulePolicyRetentionPolicy (1.7.1)

Reference documentation and code samples for the Compute V1 Client class ResourcePolicySnapshotSchedulePolicyRetentionPolicy.

Policy for retention of scheduled snapshots.

Generated from protobuf message google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicyRetentionPolicy

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ max_retention_days int

Maximum age of the snapshot that is allowed to be kept.

↳ on_source_disk_delete string

Specifies the behavior to apply to scheduled snapshots when the source disk is deleted. Check the OnSourceDiskDelete enum for the list of possible values.

getMaxRetentionDays

Maximum age of the snapshot that is allowed to be kept.

Returns
TypeDescription
int

hasMaxRetentionDays

clearMaxRetentionDays

setMaxRetentionDays

Maximum age of the snapshot that is allowed to be kept.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getOnSourceDiskDelete

Specifies the behavior to apply to scheduled snapshots when the source disk is deleted.

Check the OnSourceDiskDelete enum for the list of possible values.

Returns
TypeDescription
string

hasOnSourceDiskDelete

clearOnSourceDiskDelete

setOnSourceDiskDelete

Specifies the behavior to apply to scheduled snapshots when the source disk is deleted.

Check the OnSourceDiskDelete enum for the list of possible values.

Parameter
NameDescription
var string
Returns
TypeDescription
$this