Class: Google::Apis::HypercomputeclusterV1::NewSpotInstancesConfig
- Inherits:
-
Object
- Object
- Google::Apis::HypercomputeclusterV1::NewSpotInstancesConfig
- 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
-
#machine_type ⇒ String
Required.
-
#termination_action ⇒ String
Optional.
-
#zone ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ NewSpotInstancesConfig
constructor
A new instance of NewSpotInstancesConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ NewSpotInstancesConfig
Returns a new instance of NewSpotInstancesConfig.
1358 1359 1360 |
# File 'lib/google/apis/hypercomputecluster_v1/classes.rb', line 1358 def initialize(**args) update!(**args) end |
Instance Attribute Details
#machine_type ⇒ String
Required. Immutable. Name of the Compute Engine machine type to use, e.g. n2-standard-2.
Corresponds to the JSON property machineType
1343 1344 1345 |
# File 'lib/google/apis/hypercomputecluster_v1/classes.rb', line 1343 def machine_type @machine_type end |
#termination_action ⇒ String
Optional. Termination action for the instance. If not specified, Compute
Engine sets the termination action to DELETE.
Corresponds to the JSON property terminationAction
1349 1350 1351 |
# File 'lib/google/apis/hypercomputecluster_v1/classes.rb', line 1349 def termination_action @termination_action end |
#zone ⇒ String
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
1356 1357 1358 |
# File 'lib/google/apis/hypercomputecluster_v1/classes.rb', line 1356 def zone @zone end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1363 1364 1365 1366 1367 |
# File 'lib/google/apis/hypercomputecluster_v1/classes.rb', line 1363 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 |