class Google::Apis::AppengineV1beta::CustomMetric

Allows autoscaling based on Stackdriver metrics.

Attributes

filter[RW]

Allows filtering on the metric's fields. Corresponds to the JSON property `filter` @return [String]

metric_name[RW]

The name of the metric. Corresponds to the JSON property `metricName` @return [String]

single_instance_assignment[RW]

May be used instead of target_utilization when an instance can handle a specific amount of work/resources and the metric value is equal to the current amount of work remaining. The autoscaler will try to keep the number of instances equal to the metric value divided by single_instance_assignment. Corresponds to the JSON property `singleInstanceAssignment` @return [Float]

target_type[RW]

The type of the metric. Must be a string representing a Stackdriver metric type e.g. GAGUE, DELTA_PER_SECOND, etc. Corresponds to the JSON property `targetType` @return [String]

target_utilization[RW]

The target value for the metric. Corresponds to the JSON property `targetUtilization` @return [Float]

Public Class Methods

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

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/appengine_v1beta/classes.rb, line 729
def update!(**args)
  @filter = args[:filter] if args.key?(:filter)
  @metric_name = args[:metric_name] if args.key?(:metric_name)
  @single_instance_assignment = args[:single_instance_assignment] if args.key?(:single_instance_assignment)
  @target_type = args[:target_type] if args.key?(:target_type)
  @target_utilization = args[:target_utilization] if args.key?(:target_utilization)
end