Class: Google::Apis::ComputeAlpha::ManagedInstanceOverride

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/compute_alpha/classes.rb,
generated/google/apis/compute_alpha/representations.rb,
generated/google/apis/compute_alpha/representations.rb

Overview

Overrides of stateful properties for a given instance

Defined Under Namespace

Classes: Metadatum

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ManagedInstanceOverride

Returns a new instance of ManagedInstanceOverride



15374
15375
15376
# File 'generated/google/apis/compute_alpha/classes.rb', line 15374

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

Instance Attribute Details

#disksArray<Google::Apis::ComputeAlpha::ManagedInstanceOverrideDiskOverride>

Disk overrides defined for this instance. According to documentation the maximum number of disks attached to an instance is 128: https://cloud.google. com/compute/docs/disks/ However, compute API defines the limit at 140, so this is what we check. Corresponds to the JSON property disks



15361
15362
15363
# File 'generated/google/apis/compute_alpha/classes.rb', line 15361

def disks
  @disks
end

#metadataArray<Google::Apis::ComputeAlpha::ManagedInstanceOverride::Metadatum>

Metadata overrides defined for this instance. TODO(b/69785416) validate the total length is <9 KB Corresponds to the JSON property metadata



15367
15368
15369
# File 'generated/google/apis/compute_alpha/classes.rb', line 15367

def 
  @metadata
end

#originString

[Output Only] Indicates where does the override come from. Corresponds to the JSON property origin

Returns:

  • (String)


15372
15373
15374
# File 'generated/google/apis/compute_alpha/classes.rb', line 15372

def origin
  @origin
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



15379
15380
15381
15382
15383
# File 'generated/google/apis/compute_alpha/classes.rb', line 15379

def update!(**args)
  @disks = args[:disks] if args.key?(:disks)
  @metadata = args[:metadata] if args.key?(:metadata)
  @origin = args[:origin] if args.key?(:origin)
end