Compute V1 Client - Class ResourcePolicySnapshotSchedulePolicyRetentionPolicy (1.5.0)

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.

Generated from protobuf field optional int32 max_retention_days = 324296979;

Returns
TypeDescription
int

hasMaxRetentionDays

clearMaxRetentionDays

setMaxRetentionDays

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

Generated from protobuf field optional int32 max_retention_days = 324296979;

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.

Generated from protobuf field optional string on_source_disk_delete = 321955529;

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.

Generated from protobuf field optional string on_source_disk_delete = 321955529;

Parameter
NameDescription
var string
Returns
TypeDescription
$this