Class: Google::Apis::ComputeBeta::AutoscalingPolicyCustomMetricUtilization

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

Overview

Custom utilization metric policy.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ AutoscalingPolicyCustomMetricUtilization

Returns a new instance of AutoscalingPolicyCustomMetricUtilization



1364
1365
1366
# File 'generated/google/apis/compute_beta/classes.rb', line 1364

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

Instance Attribute Details

#metricString

The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that the number of virtual machines handling requests should increase or decrease proportionally to the metric. The metric must have a value type of INT64 or DOUBLE. Corresponds to the JSON property metric

Returns:

  • (String)


1346
1347
1348
# File 'generated/google/apis/compute_beta/classes.rb', line 1346

def metric
  @metric
end

#utilization_targetFloat

The target value of the metric that autoscaler should maintain. This must be a positive value. For example, a good metric to use as a utilization_target is compute. googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances. Corresponds to the JSON property utilizationTarget

Returns:

  • (Float)


1355
1356
1357
# File 'generated/google/apis/compute_beta/classes.rb', line 1355

def utilization_target
  @utilization_target
end

#utilization_target_typeString

Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default is GAUGE. Corresponds to the JSON property utilizationTargetType

Returns:

  • (String)


1362
1363
1364
# File 'generated/google/apis/compute_beta/classes.rb', line 1362

def utilization_target_type
  @utilization_target_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1369
1370
1371
1372
1373
# File 'generated/google/apis/compute_beta/classes.rb', line 1369

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