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
Namespace
Google \ Cloud \ Compute \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
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 | |
|---|---|
| Type | Description |
int |
|
hasMaxRetentionDays
clearMaxRetentionDays
setMaxRetentionDays
Maximum age of the snapshot that is allowed to be kept.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$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 | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|