Compute V1 Client - Class PreservedStatePreservedDisk (1.17.0)

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

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

Namespace

Google \ Cloud \ Compute \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ auto_delete string

These stateful disks will never be deleted during autohealing, update, instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole MIG is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted. Check the AutoDelete enum for the list of possible values.

↳ mode string

The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. Check the Mode enum for the list of possible values.

↳ source string

The URL of the disk resource that is stateful and should be attached to the VM instance.

getAutoDelete

These stateful disks will never be deleted during autohealing, update, instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole MIG is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.

Check the AutoDelete enum for the list of possible values.

Returns
Type Description
string

hasAutoDelete

clearAutoDelete

setAutoDelete

These stateful disks will never be deleted during autohealing, update, instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole MIG is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.

Check the AutoDelete enum for the list of possible values.

Parameter
Name Description
var string
Returns
Type Description
$this

getMode

The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.

Check the Mode enum for the list of possible values.

Returns
Type Description
string

hasMode

clearMode

setMode

The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.

Check the Mode enum for the list of possible values.

Parameter
Name Description
var string
Returns
Type Description
$this

getSource

The URL of the disk resource that is stateful and should be attached to the VM instance.

Returns
Type Description
string

hasSource

clearSource

setSource

The URL of the disk resource that is stateful and should be attached to the VM instance.

Parameter
Name Description
var string
Returns
Type Description
$this