class Google::Apis::ComputeBeta::Scheduling

Sets the scheduling options for an Instance.

Attributes

automatic_restart[RW]

Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. Corresponds to the JSON property `automaticRestart` @return [Boolean]

automatic_restart?[RW]

Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. Corresponds to the JSON property `automaticRestart` @return [Boolean]

on_host_maintenance[RW]

Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options. Corresponds to the JSON property `onHostMaintenance` @return [String]

preemptible[RW]

Whether the instance is preemptible. Corresponds to the JSON property `preemptible` @return [Boolean]

preemptible?[RW]

Whether the instance is preemptible. Corresponds to the JSON property `preemptible` @return [Boolean]

Public Class Methods

new(**args) click to toggle source
# File generated/google/apis/compute_beta/classes.rb, line 7205
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File generated/google/apis/compute_beta/classes.rb, line 7210
def update!(**args)
  @automatic_restart = args[:automatic_restart] if args.key?(:automatic_restart)
  @on_host_maintenance = args[:on_host_maintenance] if args.key?(:on_host_maintenance)
  @preemptible = args[:preemptible] if args.key?(:preemptible)
end