Class: Google::Apis::AppengineV1::BasicScaling

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

Overview

A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ BasicScaling

Returns a new instance of BasicScaling



2084
2085
2086
# File 'generated/google/apis/appengine_v1/classes.rb', line 2084

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

Instance Attribute Details

#idle_timeoutString

Duration of time after the last request that an instance must wait before the instance is shut down. Corresponds to the JSON property idleTimeout

Returns:

  • (String)


2082
2083
2084
# File 'generated/google/apis/appengine_v1/classes.rb', line 2082

def idle_timeout
  @idle_timeout
end

#max_instancesFixnum

Maximum number of instances to create for this version. Corresponds to the JSON property maxInstances

Returns:

  • (Fixnum)


2076
2077
2078
# File 'generated/google/apis/appengine_v1/classes.rb', line 2076

def max_instances
  @max_instances
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2089
2090
2091
2092
# File 'generated/google/apis/appengine_v1/classes.rb', line 2089

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