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. Next ID: 8;

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AttachedDisk

Returns a new instance of AttachedDisk.



142
143
144
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 142

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

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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