Class: Google::Apis::AppengineV1::AutomaticScaling

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

Automatic scaling is based on request rate, response latencies, and other application metrics.

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) ⇒ AutomaticScaling

Returns a new instance of AutomaticScaling



822
823
824
# File 'generated/google/apis/appengine_v1/classes.rb', line 822

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

Instance Attribute Details

#cool_down_periodString

Amount of time that the Autoscaler (https://cloud.google.com/compute/docs/ autoscaler/) should wait between changes to the number of virtual machines. Only applicable for VM runtimes. Corresponds to the JSON property coolDownPeriod

Returns:

  • (String)


761
762
763
# File 'generated/google/apis/appengine_v1/classes.rb', line 761

def cool_down_period
  @cool_down_period
end

#cpu_utilizationGoogle::Apis::AppengineV1::CpuUtilization

Target scaling by CPU usage. Corresponds to the JSON property cpuUtilization



766
767
768
# File 'generated/google/apis/appengine_v1/classes.rb', line 766

def cpu_utilization
  @cpu_utilization
end

#disk_utilizationGoogle::Apis::AppengineV1::DiskUtilization

Target scaling by disk usage. Only applicable for VM runtimes. Corresponds to the JSON property diskUtilization



815
816
817
# File 'generated/google/apis/appengine_v1/classes.rb', line 815

def disk_utilization
  @disk_utilization
end

#max_concurrent_requestsFixnum

Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value. Corresponds to the JSON property maxConcurrentRequests

Returns:

  • (Fixnum)


772
773
774
# File 'generated/google/apis/appengine_v1/classes.rb', line 772

def max_concurrent_requests
  @max_concurrent_requests
end

#max_idle_instancesFixnum

Maximum number of idle instances that should be maintained for this version. Corresponds to the JSON property maxIdleInstances

Returns:

  • (Fixnum)


777
778
779
# File 'generated/google/apis/appengine_v1/classes.rb', line 777

def max_idle_instances
  @max_idle_instances
end

#max_pending_latencyString

Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it. Corresponds to the JSON property maxPendingLatency

Returns:

  • (String)


788
789
790
# File 'generated/google/apis/appengine_v1/classes.rb', line 788

def max_pending_latency
  @max_pending_latency
end

#max_total_instancesFixnum

Maximum number of instances that should be started to handle requests. Corresponds to the JSON property maxTotalInstances

Returns:

  • (Fixnum)


782
783
784
# File 'generated/google/apis/appengine_v1/classes.rb', line 782

def max_total_instances
  @max_total_instances
end

#min_idle_instancesFixnum

Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a service. Corresponds to the JSON property minIdleInstances

Returns:

  • (Fixnum)


794
795
796
# File 'generated/google/apis/appengine_v1/classes.rb', line 794

def min_idle_instances
  @min_idle_instances
end

#min_pending_latencyString

Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it. Corresponds to the JSON property minPendingLatency

Returns:

  • (String)


805
806
807
# File 'generated/google/apis/appengine_v1/classes.rb', line 805

def min_pending_latency
  @min_pending_latency
end

#min_total_instancesFixnum

Minimum number of instances that should be maintained for this version. Corresponds to the JSON property minTotalInstances

Returns:

  • (Fixnum)


799
800
801
# File 'generated/google/apis/appengine_v1/classes.rb', line 799

def min_total_instances
  @min_total_instances
end

#network_utilizationGoogle::Apis::AppengineV1::NetworkUtilization

Target scaling by network usage. Only applicable for VM runtimes. Corresponds to the JSON property networkUtilization



820
821
822
# File 'generated/google/apis/appengine_v1/classes.rb', line 820

def network_utilization
  @network_utilization
end

#request_utilizationGoogle::Apis::AppengineV1::RequestUtilization

Target scaling by request utilization. Only applicable for VM runtimes. Corresponds to the JSON property requestUtilization



810
811
812
# File 'generated/google/apis/appengine_v1/classes.rb', line 810

def request_utilization
  @request_utilization
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



827
828
829
830
831
832
833
834
835
836
837
838
839
840
# File 'generated/google/apis/appengine_v1/classes.rb', line 827

def update!(**args)
  @cool_down_period = args[:cool_down_period] if args.key?(:cool_down_period)
  @cpu_utilization = args[:cpu_utilization] if args.key?(:cpu_utilization)
  @max_concurrent_requests = args[:max_concurrent_requests] if args.key?(:max_concurrent_requests)
  @max_idle_instances = args[:max_idle_instances] if args.key?(:max_idle_instances)
  @max_total_instances = args[:max_total_instances] if args.key?(:max_total_instances)
  @max_pending_latency = args[:max_pending_latency] if args.key?(:max_pending_latency)
  @min_idle_instances = args[:min_idle_instances] if args.key?(:min_idle_instances)
  @min_total_instances = args[:min_total_instances] if args.key?(:min_total_instances)
  @min_pending_latency = args[:min_pending_latency] if args.key?(:min_pending_latency)
  @request_utilization = args[:request_utilization] if args.key?(:request_utilization)
  @disk_utilization = args[:disk_utilization] if args.key?(:disk_utilization)
  @network_utilization = args[:network_utilization] if args.key?(:network_utilization)
end