Class: Google::Apis::HypercomputeclusterV1::ComputeResourceConfig

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

Overview

Describes how a compute resource should be created at runtime.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ComputeResourceConfig

Returns a new instance of ComputeResourceConfig.



302
303
304
# File 'lib/google/apis/hypercomputecluster_v1/classes.rb', line 302

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

Instance Attribute Details

#new_flex_start_instancesGoogle::Apis::HypercomputeclusterV1::NewFlexStartInstancesConfig

When set in a ComputeResourceConfig, indicates that VM instances should be created using Flex Start. Corresponds to the JSON property newFlexStartInstances



281
282
283
# File 'lib/google/apis/hypercomputecluster_v1/classes.rb', line 281

def new_flex_start_instances
  @new_flex_start_instances
end

#new_on_demand_instancesGoogle::Apis::HypercomputeclusterV1::NewOnDemandInstancesConfig

When set in a ComputeResourceConfig, indicates that on-demand (i.e., using the standard provisioning model) VM instances should be created. Corresponds to the JSON property newOnDemandInstances



287
288
289
# File 'lib/google/apis/hypercomputecluster_v1/classes.rb', line 287

def new_on_demand_instances
  @new_on_demand_instances
end

#new_reserved_instancesGoogle::Apis::HypercomputeclusterV1::NewReservedInstancesConfig

When set in a ComputeResourceConfig, indicates that VM instances should be created from a reservation. Corresponds to the JSON property newReservedInstances



294
295
296
# File 'lib/google/apis/hypercomputecluster_v1/classes.rb', line 294

def new_reserved_instances
  @new_reserved_instances
end

#new_spot_instancesGoogle::Apis::HypercomputeclusterV1::NewSpotInstancesConfig

When set in a ComputeResourceConfig, indicates that spot VM instances should be created. Corresponds to the JSON property newSpotInstances



300
301
302
# File 'lib/google/apis/hypercomputecluster_v1/classes.rb', line 300

def new_spot_instances
  @new_spot_instances
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



307
308
309
310
311
312
# File 'lib/google/apis/hypercomputecluster_v1/classes.rb', line 307

def update!(**args)
  @new_flex_start_instances = args[:new_flex_start_instances] if args.key?(:new_flex_start_instances)
  @new_on_demand_instances = args[:new_on_demand_instances] if args.key?(:new_on_demand_instances)
  @new_reserved_instances = args[:new_reserved_instances] if args.key?(:new_reserved_instances)
  @new_spot_instances = args[:new_spot_instances] if args.key?(:new_spot_instances)
end