# NetApp V1 API - Class Google::Cloud::NetApp::V1::BlockDevice (v2.11.0)

2.11.0 (latest) 2.10.0 2.9.0 2.8.0 2.7.0 2.6.1 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.2 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.1 1.0.0 0.6.0 0.5.2 0.4.2 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the NetApp V1 API class Google::Cloud::NetApp::V1::BlockDevice.

Block device represents the device(s) which are stored in the block volume.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #host_groups

    def host_groups() -> ::Array<::String>

**Returns**

- (::Array\<::String\>) --- Optional. A list of host groups that identify hosts that can mount the block volume. Format: `projects/{project_id}/locations/{location}/hostGroups/{host_group_id}` This field can be updated after the block device is created.

### #host_groups=

    def host_groups=(value) -> ::Array<::String>

**Parameter**

- **value** (::Array\<::String\>) --- Optional. A list of host groups that identify hosts that can mount the block volume. Format: `projects/{project_id}/locations/{location}/hostGroups/{host_group_id}` This field can be updated after the block device is created.
**Returns**

- (::Array\<::String\>) --- Optional. A list of host groups that identify hosts that can mount the block volume. Format: `projects/{project_id}/locations/{location}/hostGroups/{host_group_id}` This field can be updated after the block device is created.

### #identifier

    def identifier() -> ::String

**Returns**

- (::String) --- Output only. Device identifier of the block volume. This represents `lun_serial_number` for iSCSI volumes.

### #name

    def name() -> ::String

**Returns**

- (::String) --- Optional. User-defined name for the block device, unique within the volume.
  In case no user input is provided, name will be auto-generated in the
  backend. The name must meet the following requirements:

  - Be between 1 and 255 characters long.
  - Contain only uppercase or lowercase letters (A-Z, a-z), numbers (0-9), and the following special characters: "-", "_", "}", "{", ".".
  - Spaces are not allowed.

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) ---

  Optional. User-defined name for the block device, unique within the volume.
  In case no user input is provided, name will be auto-generated in the
  backend. The name must meet the following requirements:
  - Be between 1 and 255 characters long.
  - Contain only uppercase or lowercase letters (A-Z, a-z), numbers (0-9), and the following special characters: "-", "_", "}", "{", ".".
  - Spaces are not allowed.
**Returns**

- (::String) --- Optional. User-defined name for the block device, unique within the volume.
  In case no user input is provided, name will be auto-generated in the
  backend. The name must meet the following requirements:

  - Be between 1 and 255 characters long.
  - Contain only uppercase or lowercase letters (A-Z, a-z), numbers (0-9), and the following special characters: "-", "_", "}", "{", ".".
  - Spaces are not allowed.

### #os_type

    def os_type() -> ::Google::Cloud::NetApp::V1::OsType

**Returns**

- ([::Google::Cloud::NetApp::V1::OsType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-netapp-v1/latest/Google-Cloud-NetApp-V1-OsType)) --- Required. Immutable. The OS type of the volume. This field can't be changed after the block device is created.

### #os_type=

    def os_type=(value) -> ::Google::Cloud::NetApp::V1::OsType

**Parameter**

- **value** ([::Google::Cloud::NetApp::V1::OsType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-netapp-v1/latest/Google-Cloud-NetApp-V1-OsType)) --- Required. Immutable. The OS type of the volume. This field can't be changed after the block device is created.
**Returns**

- ([::Google::Cloud::NetApp::V1::OsType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-netapp-v1/latest/Google-Cloud-NetApp-V1-OsType)) --- Required. Immutable. The OS type of the volume. This field can't be changed after the block device is created.

### #size_gib

    def size_gib() -> ::Integer

**Returns**

- (::Integer) --- Optional. The size of the block device in GiB. Any value provided for the `size_gib` field during volume creation is ignored. The block device's size is system-managed and will be set to match the parent Volume's `capacity_gib`.

### #size_gib=

    def size_gib=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- Optional. The size of the block device in GiB. Any value provided for the `size_gib` field during volume creation is ignored. The block device's size is system-managed and will be set to match the parent Volume's `capacity_gib`.
**Returns**

- (::Integer) --- Optional. The size of the block device in GiB. Any value provided for the `size_gib` field during volume creation is ignored. The block device's size is system-managed and will be set to match the parent Volume's `capacity_gib`.