Class: Google::Apis::ComputeAlpha::SchedulingGracefulShutdown

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

Overview

Configuration for gracefully shutting down the instance.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SchedulingGracefulShutdown

Returns a new instance of SchedulingGracefulShutdown.



42854
42855
42856
# File 'lib/google/apis/compute_alpha/classes.rb', line 42854

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

Instance Attribute Details

#enabledBoolean Also known as: enabled?

Opts-in for graceful shutdown. Corresponds to the JSON property enabled

Returns:

  • (Boolean)


42843
42844
42845
# File 'lib/google/apis/compute_alpha/classes.rb', line 42843

def enabled
  @enabled
end

#max_durationGoogle::Apis::ComputeAlpha::Duration

A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10, 000 years. Corresponds to the JSON property maxDuration



42852
42853
42854
# File 'lib/google/apis/compute_alpha/classes.rb', line 42852

def max_duration
  @max_duration
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



42859
42860
42861
42862
# File 'lib/google/apis/compute_alpha/classes.rb', line 42859

def update!(**args)
  @enabled = args[:enabled] if args.key?(:enabled)
  @max_duration = args[:max_duration] if args.key?(:max_duration)
end