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



14716
14717
14718
# File 'generated/google/apis/compute_alpha/classes.rb', line 14716

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



14703
14704
14705
# File 'generated/google/apis/compute_alpha/classes.rb', line 14703

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



14709
14710
14711
# File 'generated/google/apis/compute_alpha/classes.rb', line 14709

def 
  @metadata
end

#originString

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

Returns:

  • (String)


14714
14715
14716
# File 'generated/google/apis/compute_alpha/classes.rb', line 14714

def origin
  @origin
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



14721
14722
14723
14724
14725
# File 'generated/google/apis/compute_alpha/classes.rb', line 14721

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