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



16570
16571
16572
# File 'generated/google/apis/compute_alpha/classes.rb', line 16570

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



16557
16558
16559
# File 'generated/google/apis/compute_alpha/classes.rb', line 16557

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



16563
16564
16565
# File 'generated/google/apis/compute_alpha/classes.rb', line 16563

def 
  @metadata
end

#originString

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

Returns:

  • (String)


16568
16569
16570
# File 'generated/google/apis/compute_alpha/classes.rb', line 16568

def origin
  @origin
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



16575
16576
16577
16578
16579
# File 'generated/google/apis/compute_alpha/classes.rb', line 16575

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