Google Cloud Notebooks V1 Client - Class LocalDisk (0.5.0)

Reference documentation and code samples for the Google Cloud Notebooks V1 Client class LocalDisk.

A Local attached disk resource.

Generated from protobuf message google.cloud.notebooks.v1.LocalDisk

Namespace

Google \ Cloud \ Notebooks \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ auto_delete bool

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

↳ boot bool

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

↳ device_name string

Optional. Output only. Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.

↳ guest_os_features array<Google\Cloud\Notebooks\V1\LocalDisk\RuntimeGuestOsFeature>

Output only. Indicates 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.

↳ index int

Output only. A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.

↳ initialize_params Google\Cloud\Notebooks\V1\LocalDiskInitializeParams

Input only. Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. This property is mutually exclusive with the source property; you can only define one or the other, but not both.

↳ interface string

Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance. Valid values: * NVME * SCSI

↳ kind string

Output only. Type of the resource. Always compute#attachedDisk for attached disks.

↳ licenses array

Output only. Any valid publicly visible licenses.

↳ 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. Valid values: * READ_ONLY * READ_WRITE

↳ source string

Specifies a valid partial or full URL to an existing Persistent Disk resource.

↳ type string

Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. Valid values: * PERSISTENT * SCRATCH

getAutoDelete

Optional. Output only. 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

setAutoDelete

Optional. Output only. 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
var bool
Returns
TypeDescription
$this

getBoot

Optional. Output only. 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

setBoot

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

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getDeviceName

Optional. Output only. Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.

If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.

Returns
TypeDescription
string

setDeviceName

Optional. Output only. Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.

If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getGuestOsFeatures

Output only. Indicates 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

Output only. Indicates 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
var array<Google\Cloud\Notebooks\V1\LocalDisk\RuntimeGuestOsFeature>
Returns
TypeDescription
$this

getIndex

Output only. A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.

Returns
TypeDescription
int

setIndex

Output only. A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getInitializeParams

Input only. Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.

This property is mutually exclusive with the source property; you can only define one or the other, but not both.

Returns
TypeDescription
Google\Cloud\Notebooks\V1\LocalDiskInitializeParams|null

hasInitializeParams

clearInitializeParams

setInitializeParams

Input only. Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.

This property is mutually exclusive with the source property; you can only define one or the other, but not both.

Parameter
NameDescription
var Google\Cloud\Notebooks\V1\LocalDiskInitializeParams
Returns
TypeDescription
$this

getInterface

Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.

Valid values:

  • NVME
  • SCSI
Returns
TypeDescription
string

setInterface

Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.

Valid values:

  • NVME
  • SCSI
Parameter
NameDescription
var string
Returns
TypeDescription
$this

getKind

Output only. Type of the resource. Always compute#attachedDisk for attached disks.

Returns
TypeDescription
string

setKind

Output only. Type of the resource. Always compute#attachedDisk for attached disks.

Parameter
NameDescription
var string
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
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. Valid values:

  • READ_ONLY
  • READ_WRITE
Returns
TypeDescription
string

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. Valid values:

  • READ_ONLY
  • READ_WRITE
Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSource

Specifies a valid partial or full URL to an existing Persistent Disk resource.

Returns
TypeDescription
string

setSource

Specifies a valid partial or full URL to an existing Persistent Disk resource.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getType

Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.

Valid values:

  • PERSISTENT
  • SCRATCH
Returns
TypeDescription
string

setType

Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.

Valid values:

  • PERSISTENT
  • SCRATCH
Parameter
NameDescription
var string
Returns
TypeDescription
$this