Compute V1 Client - Class SavedAttachedDisk (1.20.0)

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

DEPRECATED: Please use compute#savedDisk instead. An instance-attached disk resource.

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

Namespace

Google \ Cloud \ Compute \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
dataarray

Optional. Data for populating the Message object.

↳ auto_deletebool

Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).

↳ bootbool

Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.

↳ device_namestring

Specifies the name of the disk attached to the source instance.

↳ disk_encryption_keyGoogle\Cloud\Compute\V1\CustomerEncryptionKey

The encryption key for the disk.

↳ disk_size_gbint|string

The size of the disk in base-2 GB.

↳ disk_typestring

[Output Only] URL of the disk type resource. For example: projects/project /zones/zone/diskTypes/pd-standard or pd-ssd

↳ guest_os_featuresarray<Google\Cloud\Compute\V1\GuestOsFeature>

A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.

↳ indexint

Specifies zero-based index of the disk that is attached to the source instance.

↳ interfacestring

Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. Check the Interface enum for the list of possible values.

↳ kindstring

[Output Only] Type of the resource. Always compute#attachedDisk for attached disks.

↳ licensesarray

[Output Only] Any valid publicly visible licenses.

↳ modestring

The mode in which this disk is attached to the source instance, either READ_WRITE or READ_ONLY. Check the Mode enum for the list of possible values.

↳ sourcestring

Specifies a URL of the disk attached to the source instance.

↳ storage_bytesint|string

[Output Only] A size of the storage used by the disk's snapshot by this machine image.

↳ storage_bytes_statusstring

[Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation. This status can either be UPDATING, meaning the size of the snapshot is being updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-date. Check the StorageBytesStatus enum for the list of possible values.

↳ typestring

Specifies the type of the attached disk, either SCRATCH or PERSISTENT. Check the Type enum for the list of possible values.

getAutoDelete

Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).

Returns
TypeDescription
bool

hasAutoDelete

clearAutoDelete

setAutoDelete

Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).

Parameter
NameDescription
varbool
Returns
TypeDescription
$this

getBoot

Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.

Returns
TypeDescription
bool

hasBoot

clearBoot

setBoot

Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.

Parameter
NameDescription
varbool
Returns
TypeDescription
$this

getDeviceName

Specifies the name of the disk attached to the source instance.

Returns
TypeDescription
string

hasDeviceName

clearDeviceName

setDeviceName

Specifies the name of the disk attached to the source instance.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getDiskEncryptionKey

The encryption key for the disk.

Returns
TypeDescription
Google\Cloud\Compute\V1\CustomerEncryptionKey|null

hasDiskEncryptionKey

clearDiskEncryptionKey

setDiskEncryptionKey

The encryption key for the disk.

Parameter
NameDescription
varGoogle\Cloud\Compute\V1\CustomerEncryptionKey
Returns
TypeDescription
$this

getDiskSizeGb

The size of the disk in base-2 GB.

Returns
TypeDescription
int|string

hasDiskSizeGb

clearDiskSizeGb

setDiskSizeGb

The size of the disk in base-2 GB.

Parameter
NameDescription
varint|string
Returns
TypeDescription
$this

getDiskType

[Output Only] URL of the disk type resource. For example: projects/project /zones/zone/diskTypes/pd-standard or pd-ssd

Returns
TypeDescription
string

hasDiskType

clearDiskType

setDiskType

[Output Only] URL of the disk type resource. For example: projects/project /zones/zone/diskTypes/pd-standard or pd-ssd

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getGuestOsFeatures

A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setGuestOsFeatures

A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.

Parameter
NameDescription
vararray<Google\Cloud\Compute\V1\GuestOsFeature>
Returns
TypeDescription
$this

getIndex

Specifies zero-based index of the disk that is attached to the source instance.

Returns
TypeDescription
int

hasIndex

clearIndex

setIndex

Specifies zero-based index of the disk that is attached to the source instance.

Parameter
NameDescription
varint
Returns
TypeDescription
$this

getInterface

Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME.

Check the Interface enum for the list of possible values.

Returns
TypeDescription
string

hasInterface

clearInterface

setInterface

Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME.

Check the Interface enum for the list of possible values.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getKind

[Output Only] Type of the resource. Always compute#attachedDisk for attached disks.

Returns
TypeDescription
string

hasKind

clearKind

setKind

[Output Only] Type of the resource. Always compute#attachedDisk for attached disks.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getLicenses

[Output Only] Any valid publicly visible licenses.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setLicenses

[Output Only] Any valid publicly visible licenses.

Parameter
NameDescription
varstring[]
Returns
TypeDescription
$this

getMode

The mode in which this disk is attached to the source instance, either READ_WRITE or READ_ONLY.

Check the Mode enum for the list of possible values.

Returns
TypeDescription
string

hasMode

clearMode

setMode

The mode in which this disk is attached to the source instance, either READ_WRITE or READ_ONLY.

Check the Mode enum for the list of possible values.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getSource

Specifies a URL of the disk attached to the source instance.

Returns
TypeDescription
string

hasSource

clearSource

setSource

Specifies a URL of the disk attached to the source instance.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getStorageBytes

[Output Only] A size of the storage used by the disk's snapshot by this machine image.

Returns
TypeDescription
int|string

hasStorageBytes

clearStorageBytes

setStorageBytes

[Output Only] A size of the storage used by the disk's snapshot by this machine image.

Parameter
NameDescription
varint|string
Returns
TypeDescription
$this

getStorageBytesStatus

[Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation. This status can either be UPDATING, meaning the size of the snapshot is being updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-date.

Check the StorageBytesStatus enum for the list of possible values.

Returns
TypeDescription
string

hasStorageBytesStatus

clearStorageBytesStatus

setStorageBytesStatus

[Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation. This status can either be UPDATING, meaning the size of the snapshot is being updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-date.

Check the StorageBytesStatus enum for the list of possible values.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getType

Specifies the type of the attached disk, either SCRATCH or PERSISTENT.

Check the Type enum for the list of possible values.

Returns
TypeDescription
string

hasType

clearType

setType

Specifies the type of the attached disk, either SCRATCH or PERSISTENT.

Check the Type enum for the list of possible values.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this