Reference documentation and code samples for the Google Cloud Notebooks V1 Client class Disk.
An instance-attached disk resource.
Generated from protobuf message google.cloud.notebooks.v1.Instance.Disk
Namespace
Google \ Cloud \ Notebooks \ V1 \ InstanceMethods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ auto_delete |
bool
Indicates whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance). |
↳ boot |
bool
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
Indicates a unique device name of your choice that is reflected into the |
↳ disk_size_gb |
int|string
Indicates the size of the disk in base-2 GB. |
↳ guest_os_features |
array<Google\Cloud\Notebooks\V1\Instance\Disk\GuestOsFeature>
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|string
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. |
↳ interface |
string
Indicates 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: * |
↳ kind |
string
Type of the resource. Always compute#attachedDisk for attached disks. |
↳ licenses |
array
A list of publicly visible licenses. Reserved for Google's use. A License represents billing and aggregate usage data for public and marketplace images. |
↳ mode |
string
The mode in which to attach this disk, either |
↳ source |
string
Indicates a valid partial or full URL to an existing Persistent Disk resource. |
↳ type |
string
Indicates the type of the disk, either |
getAutoDelete
Indicates whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
Returns | |
---|---|
Type | Description |
bool |
setAutoDelete
Indicates whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
Parameter | |
---|---|
Name | Description |
var |
bool
|
Returns | |
---|---|
Type | Description |
$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 | |
---|---|
Type | Description |
bool |
setBoot
Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
Parameter | |
---|---|
Name | Description |
var |
bool
|
Returns | |
---|---|
Type | Description |
$this |
getDeviceName
Indicates 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 | |
---|---|
Type | Description |
string |
setDeviceName
Indicates 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 | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getDiskSizeGb
Indicates the size of the disk in base-2 GB.
Returns | |
---|---|
Type | Description |
int|string |
setDiskSizeGb
Indicates the size of the disk in base-2 GB.
Parameter | |
---|---|
Name | Description |
var |
int|string
|
Returns | |
---|---|
Type | Description |
$this |
getGuestOsFeatures
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 | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setGuestOsFeatures
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 | |
---|---|
Name | Description |
var |
array<Google\Cloud\Notebooks\V1\Instance\Disk\GuestOsFeature>
|
Returns | |
---|---|
Type | Description |
$this |
getIndex
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 | |
---|---|
Type | Description |
int|string |
setIndex
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 | |
---|---|
Name | Description |
var |
int|string
|
Returns | |
---|---|
Type | Description |
$this |
getInterface
Indicates 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 | |
---|---|
Type | Description |
string |
setInterface
Indicates 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 | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getKind
Type of the resource. Always compute#attachedDisk for attached disks.
Returns | |
---|---|
Type | Description |
string |
setKind
Type of the resource. Always compute#attachedDisk for attached disks.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getLicenses
A list of publicly visible licenses. Reserved for Google's use.
A License represents billing and aggregate usage data for public and marketplace images.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setLicenses
A list of publicly visible licenses. Reserved for Google's use.
A License represents billing and aggregate usage data for public and marketplace images.
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. Valid values:
READ_ONLY
READ_WRITE
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getSource
Indicates a valid partial or full URL to an existing Persistent Disk resource.
Returns | |
---|---|
Type | Description |
string |
setSource
Indicates a valid partial or full URL to an existing Persistent Disk resource.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getType
Indicates the type of the disk, either SCRATCH
or PERSISTENT
.
Valid values:
PERSISTENT
SCRATCH
Returns | |
---|---|
Type | Description |
string |
setType
Indicates the type of the disk, either SCRATCH
or PERSISTENT
.
Valid values:
PERSISTENT
SCRATCH
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |