class Google::Apis::AutoscalerV1beta2::AutoscalingPolicyCustomMetricUtilization

Custom utilization metric policy.

Attributes

metric[RW]

Identifier of the metric. It should be a Cloud Monitoring metric. The metric can not have negative values. The metric should be an utilization metric ( increasing number of VMs handling requests x times should reduce average value of the metric roughly x times). For example you could use: compute.googleapis. com/instance/network/received_bytes_count. Corresponds to the JSON property `metric` @return [String]

utilization_target[RW]

Target value of the metric which Autoscaler should maintain. Must be a positive value. Corresponds to the JSON property `utilizationTarget` @return [Float]

utilization_target_type[RW]

Defines type in which #utilization_target is expressed. Corresponds to the JSON property `utilizationTargetType` @return [String]

Public Class Methods

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

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File generated/google/apis/autoscaler_v1beta2/classes.rb, line 223
def update!(**args)
  @metric = args[:metric] if args.key?(:metric)
  @utilization_target = args[:utilization_target] if args.key?(:utilization_target)
  @utilization_target_type = args[:utilization_target_type] if args.key?(:utilization_target_type)
end