Compute V1 Client - Class PreservedStatePreservedDisk (1.8.3)

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

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

Methods

__construct

Constructor.

Parameters
NameDescription
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
TypeDescription
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
NameDescription
var string
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var string
Returns
TypeDescription
$this

getSource

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

Returns
TypeDescription
string

hasSource

clearSource

setSource

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this