# Notebooks V2 API - Class Google::Cloud::Notebooks::V2::DataDisk (v1.5.0)

1.5.0 (latest) 1.4.0 1.3.1 1.2.0 1.1.0 1.0.1 0.6.0 0.5.0 0.4.2 0.3.2 0.2.0 0.1.0 Reference documentation and code samples for the Notebooks V2 API class Google::Cloud::Notebooks::V2::DataDisk.

An instance-attached disk resource.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #disk_encryption

    def disk_encryption() -> ::Google::Cloud::Notebooks::V2::DiskEncryption

**Returns**

- ([::Google::Cloud::Notebooks::V2::DiskEncryption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-notebooks-v2/latest/Google-Cloud-Notebooks-V2-DiskEncryption)) --- Optional. Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.

### #disk_encryption=

    def disk_encryption=(value) -> ::Google::Cloud::Notebooks::V2::DiskEncryption

**Parameter**

- **value** ([::Google::Cloud::Notebooks::V2::DiskEncryption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-notebooks-v2/latest/Google-Cloud-Notebooks-V2-DiskEncryption)) --- Optional. Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
**Returns**

- ([::Google::Cloud::Notebooks::V2::DiskEncryption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-notebooks-v2/latest/Google-Cloud-Notebooks-V2-DiskEncryption)) --- Optional. Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.

### #disk_size_gb

    def disk_size_gb() -> ::Integer

**Returns**

- (::Integer) --- Optional. The size of the disk in GB attached to this VM instance, up to a maximum of 64000 GB (64 TB). If not specified, this defaults to 100.

### #disk_size_gb=

    def disk_size_gb=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- Optional. The size of the disk in GB attached to this VM instance, up to a maximum of 64000 GB (64 TB). If not specified, this defaults to 100.
**Returns**

- (::Integer) --- Optional. The size of the disk in GB attached to this VM instance, up to a maximum of 64000 GB (64 TB). If not specified, this defaults to 100.

### #disk_type

    def disk_type() -> ::Google::Cloud::Notebooks::V2::DiskType

**Returns**

- ([::Google::Cloud::Notebooks::V2::DiskType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-notebooks-v2/latest/Google-Cloud-Notebooks-V2-DiskType)) --- Optional. Input only. Indicates the type of the disk.

### #disk_type=

    def disk_type=(value) -> ::Google::Cloud::Notebooks::V2::DiskType

**Parameter**

- **value** ([::Google::Cloud::Notebooks::V2::DiskType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-notebooks-v2/latest/Google-Cloud-Notebooks-V2-DiskType)) --- Optional. Input only. Indicates the type of the disk.
**Returns**

- ([::Google::Cloud::Notebooks::V2::DiskType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-notebooks-v2/latest/Google-Cloud-Notebooks-V2-DiskType)) --- Optional. Input only. Indicates the type of the disk.

### #kms_key

    def kms_key() -> ::String

**Returns**

- (::String) --- Optional. Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption is CMEK. Format: `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`


  Learn more about using your own encryption keys.

### #kms_key=

    def kms_key=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption is CMEK. Format: `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`


  Learn more about using your own encryption keys.
**Returns**

- (::String) --- Optional. Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption is CMEK. Format: `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`


  Learn more about using your own encryption keys.