Class: Google::Apis::TpuV2alpha1::AttachedDisk

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/tpu_v2alpha1/classes.rb,
lib/google/apis/tpu_v2alpha1/representations.rb,
lib/google/apis/tpu_v2alpha1/representations.rb

Overview

A node-attached disk resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AttachedDisk

Returns a new instance of AttachedDisk.



147
148
149
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 147

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#modeString

The mode in which to attach this disk. If not specified, the default is READ_WRITE mode. Only applicable to data_disks. Corresponds to the JSON property mode

Returns:

  • (String)


134
135
136
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 134

def mode
  @mode
end

#source_diskString

Specifies the full path to an existing disk. For example: "projects/my-project/ zones/us-central1-c/disks/my-disk". Corresponds to the JSON property sourceDisk

Returns:

  • (String)


140
141
142
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 140

def source_disk
  @source_disk
end

#worker_idsArray<String>

Optional. The list of worker IDs this disk is attached to. Corresponds to the JSON property workerIds

Returns:

  • (Array<String>)


145
146
147
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 145

def worker_ids
  @worker_ids
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



152
153
154
155
156
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 152

def update!(**args)
  @mode = args[:mode] if args.key?(:mode)
  @source_disk = args[:source_disk] if args.key?(:source_disk)
  @worker_ids = args[:worker_ids] if args.key?(:worker_ids)
end