Class: Google::Apis::HypercomputeclusterV1::NewSpotInstancesConfig

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

When set in a ComputeResourceConfig, indicates that spot VM instances should be created.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NewSpotInstancesConfig

Returns a new instance of NewSpotInstancesConfig.



1348
1349
1350
# File 'lib/google/apis/hypercomputecluster_v1/classes.rb', line 1348

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

Instance Attribute Details

#machine_typeString

Required. Immutable. Name of the Compute Engine machine type to use, e.g. n2-standard-2. Corresponds to the JSON property machineType

Returns:

  • (String)


1333
1334
1335
# File 'lib/google/apis/hypercomputecluster_v1/classes.rb', line 1333

def machine_type
  @machine_type
end

#termination_actionString

Optional. Termination action for the instance. If not specified, Compute Engine sets the termination action to DELETE. Corresponds to the JSON property terminationAction

Returns:

  • (String)


1339
1340
1341
# File 'lib/google/apis/hypercomputecluster_v1/classes.rb', line 1339

def termination_action
  @termination_action
end

#zoneString

Required. Immutable. Name of the zone in which VM instances should run, e.g., us-central1-a. Must be in the same region as the cluster, and must match the zone of any other resources specified in the cluster. Corresponds to the JSON property zone

Returns:

  • (String)


1346
1347
1348
# File 'lib/google/apis/hypercomputecluster_v1/classes.rb', line 1346

def zone
  @zone
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1353
1354
1355
1356
1357
# File 'lib/google/apis/hypercomputecluster_v1/classes.rb', line 1353

def update!(**args)
  @machine_type = args[:machine_type] if args.key?(:machine_type)
  @termination_action = args[:termination_action] if args.key?(:termination_action)
  @zone = args[:zone] if args.key?(:zone)
end