Reference documentation and code samples for the AI Platform Notebooks V1 API class Google::Cloud::Notebooks::V1::LocalDisk.
A Local attached disk resource.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#auto_delete
defauto_delete()->::Boolean
Returns
(::Boolean) — 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
defboot()->::Boolean
Returns
(::Boolean) — 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
defdevice_name()->::String
Returns
(::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.
(::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
defindex()->::Integer
Returns
(::Integer) — 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.
(::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.
value (::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.
Returns
(::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
definterface()->::String
Returns
(::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
#interface=
definterface=(value)->::String
Parameter
value (::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
Returns
(::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
defkind()->::String
Returns
(::String) — Output only. Type of the resource. Always compute#attachedDisk for attached disks.
#licenses
deflicenses()->::Array<::String>
Returns
(::Array<::String>) — Output only. Any valid publicly visible licenses.
#mode
defmode()->::String
Returns
(::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
#mode=
defmode=(value)->::String
Parameter
value (::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
Returns
(::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
defsource()->::String
Returns
(::String) — Specifies a valid partial or full URL to an existing Persistent Disk
resource.
#source=
defsource=(value)->::String
Parameter
value (::String) — Specifies a valid partial or full URL to an existing Persistent Disk
resource.
Returns
(::String) — Specifies a valid partial or full URL to an existing Persistent Disk
resource.
#type
deftype()->::String
Returns
(::String) —
Specifies the type of the disk, either SCRATCH or PERSISTENT. If not
specified, the default is PERSISTENT.
Valid values:
PERSISTENT
SCRATCH
#type=
deftype=(value)->::String
Parameter
value (::String) —
Specifies the type of the disk, either SCRATCH or PERSISTENT. If not
specified, the default is PERSISTENT.
Valid values:
PERSISTENT
SCRATCH
Returns
(::String) —
Specifies the type of the disk, either SCRATCH or PERSISTENT. If not
specified, the default is PERSISTENT.
Valid values:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# AI Platform Notebooks V1 API - Class Google::Cloud::Notebooks::V1::LocalDisk (v1.1.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.1.0 (latest)](/ruby/docs/reference/google-cloud-notebooks-v1/latest/Google-Cloud-Notebooks-V1-LocalDisk)\n- [1.0.1](/ruby/docs/reference/google-cloud-notebooks-v1/1.0.1/Google-Cloud-Notebooks-V1-LocalDisk)\n- [0.11.0](/ruby/docs/reference/google-cloud-notebooks-v1/0.11.0/Google-Cloud-Notebooks-V1-LocalDisk)\n- [0.10.0](/ruby/docs/reference/google-cloud-notebooks-v1/0.10.0/Google-Cloud-Notebooks-V1-LocalDisk)\n- [0.9.1](/ruby/docs/reference/google-cloud-notebooks-v1/0.9.1/Google-Cloud-Notebooks-V1-LocalDisk)\n- [0.8.2](/ruby/docs/reference/google-cloud-notebooks-v1/0.8.2/Google-Cloud-Notebooks-V1-LocalDisk)\n- [0.7.0](/ruby/docs/reference/google-cloud-notebooks-v1/0.7.0/Google-Cloud-Notebooks-V1-LocalDisk)\n- [0.6.1](/ruby/docs/reference/google-cloud-notebooks-v1/0.6.1/Google-Cloud-Notebooks-V1-LocalDisk)\n- [0.5.0](/ruby/docs/reference/google-cloud-notebooks-v1/0.5.0/Google-Cloud-Notebooks-V1-LocalDisk)\n- [0.4.2](/ruby/docs/reference/google-cloud-notebooks-v1/0.4.2/Google-Cloud-Notebooks-V1-LocalDisk)\n- [0.3.0](/ruby/docs/reference/google-cloud-notebooks-v1/0.3.0/Google-Cloud-Notebooks-V1-LocalDisk)\n- [0.2.1](/ruby/docs/reference/google-cloud-notebooks-v1/0.2.1/Google-Cloud-Notebooks-V1-LocalDisk)\n- [0.1.0](/ruby/docs/reference/google-cloud-notebooks-v1/0.1.0/Google-Cloud-Notebooks-V1-LocalDisk) \nReference documentation and code samples for the AI Platform Notebooks V1 API class Google::Cloud::Notebooks::V1::LocalDisk.\n\nA Local attached disk resource. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #auto_delete\n\n def auto_delete() -\u003e ::Boolean\n\n**Returns**\n\n- (::Boolean) --- 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).\n\n### #boot\n\n def boot() -\u003e ::Boolean\n\n**Returns**\n\n- (::Boolean) --- 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.\n\n### #device_name\n\n def device_name() -\u003e ::String\n\n**Returns**\n\n- (::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.\n\n\n If not specified, the server chooses a default device name to apply to this\n disk, in the form persistent-disk-x, where x is a number assigned by Google\n Compute Engine. This field is only applicable for persistent disks.\n\n### #guest_os_features\n\n def guest_os_features() -\u003e ::Array\u003c::Google::Cloud::Notebooks::V1::LocalDisk::RuntimeGuestOsFeature\u003e\n\n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::Notebooks::V1::LocalDisk::RuntimeGuestOsFeature](./Google-Cloud-Notebooks-V1-LocalDisk-RuntimeGuestOsFeature)\\\u003e) --- 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.\n\n### #index\n\n def index() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- 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.\n\n### #initialize_params\n\n def initialize_params() -\u003e ::Google::Cloud::Notebooks::V1::LocalDiskInitializeParams\n\n**Returns**\n\n- ([::Google::Cloud::Notebooks::V1::LocalDiskInitializeParams](./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.\n\n\n This property is mutually exclusive with the source property; you can only\n define one or the other, but not both.\n\n### #initialize_params=\n\n def initialize_params=(value) -\u003e ::Google::Cloud::Notebooks::V1::LocalDiskInitializeParams\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Notebooks::V1::LocalDiskInitializeParams](./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.\n\n\n This property is mutually exclusive with the source property; you can only\ndefine one or the other, but not both. \n**Returns**\n\n- ([::Google::Cloud::Notebooks::V1::LocalDiskInitializeParams](./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.\n\n\n This property is mutually exclusive with the source property; you can only\n define one or the other, but not both.\n\n### #interface\n\n def interface() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Specifies the disk interface to use for attaching this disk, which is\n either SCSI or NVME. The default is SCSI. Persistent disks must always use\n SCSI and the request will fail if you attempt to attach a persistent disk\n in any other format than SCSI. Local SSDs can use either NVME or SCSI. For\n performance characteristics of SCSI over NVMe, see Local SSD performance.\n Valid values:\n\n - `NVME`\n - `SCSI`\n\n### #interface=\n\n def interface=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) ---\n\n Specifies the disk interface to use for attaching this disk, which is\n either SCSI or NVME. The default is SCSI. Persistent disks must always use\n SCSI and the request will fail if you attempt to attach a persistent disk\n in any other format than SCSI. Local SSDs can use either NVME or SCSI. For\n performance characteristics of SCSI over NVMe, see Local SSD performance.\n Valid values:\n - `NVME`\n- `SCSI` \n**Returns**\n\n- (::String) --- Specifies the disk interface to use for attaching this disk, which is\n either SCSI or NVME. The default is SCSI. Persistent disks must always use\n SCSI and the request will fail if you attempt to attach a persistent disk\n in any other format than SCSI. Local SSDs can use either NVME or SCSI. For\n performance characteristics of SCSI over NVMe, see Local SSD performance.\n Valid values:\n\n - `NVME`\n - `SCSI`\n\n### #kind\n\n def kind() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Output only. Type of the resource. Always compute#attachedDisk for attached disks.\n\n### #licenses\n\n def licenses() -\u003e ::Array\u003c::String\u003e\n\n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- Output only. Any valid publicly visible licenses.\n\n### #mode\n\n def mode() -\u003e ::String\n\n**Returns**\n\n- (::String) --- The mode in which to attach this disk, either `READ_WRITE` or `READ_ONLY`.\n If not specified, the default is to attach the disk in `READ_WRITE` mode.\n Valid values:\n\n - `READ_ONLY`\n - `READ_WRITE`\n\n### #mode=\n\n def mode=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) ---\n\n The mode in which to attach this disk, either `READ_WRITE` or `READ_ONLY`.\n If not specified, the default is to attach the disk in `READ_WRITE` mode.\n Valid values:\n - `READ_ONLY`\n- `READ_WRITE` \n**Returns**\n\n- (::String) --- The mode in which to attach this disk, either `READ_WRITE` or `READ_ONLY`.\n If not specified, the default is to attach the disk in `READ_WRITE` mode.\n Valid values:\n\n - `READ_ONLY`\n - `READ_WRITE`\n\n### #source\n\n def source() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Specifies a valid partial or full URL to an existing Persistent Disk resource.\n\n### #source=\n\n def source=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Specifies a valid partial or full URL to an existing Persistent Disk resource. \n**Returns**\n\n- (::String) --- Specifies a valid partial or full URL to an existing Persistent Disk resource.\n\n### #type\n\n def type() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not\n specified, the default is `PERSISTENT`.\n Valid values:\n\n - `PERSISTENT`\n - `SCRATCH`\n\n### #type=\n\n def type=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) ---\n\n Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not\n specified, the default is `PERSISTENT`.\n Valid values:\n - `PERSISTENT`\n- `SCRATCH` \n**Returns**\n\n- (::String) --- Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not\n specified, the default is `PERSISTENT`.\n Valid values:\n\n - `PERSISTENT`\n - `SCRATCH`"]]