Class: Google::Apis::AutoscalerV1beta2::AutoscalingPolicyCustomMetricUtilization
- Inherits:
-
Object
- Object
- Google::Apis::AutoscalerV1beta2::AutoscalingPolicyCustomMetricUtilization
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/autoscaler_v1beta2/classes.rb,
generated/google/apis/autoscaler_v1beta2/representations.rb,
generated/google/apis/autoscaler_v1beta2/representations.rb
Overview
Custom utilization metric policy.
Instance Attribute Summary collapse
-
#metric ⇒ String
Identifier of the metric.
-
#utilization_target ⇒ Float
Target value of the metric which Autoscaler should maintain.
-
#utilization_target_type ⇒ String
Defines type in which utilization_target is expressed.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AutoscalingPolicyCustomMetricUtilization
constructor
A new instance of AutoscalingPolicyCustomMetricUtilization.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ AutoscalingPolicyCustomMetricUtilization
Returns a new instance of AutoscalingPolicyCustomMetricUtilization.
218 219 220 |
# File 'generated/google/apis/autoscaler_v1beta2/classes.rb', line 218 def initialize(**args) update!(**args) end |
Instance Attribute Details
#metric ⇒ String
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
205 206 207 |
# File 'generated/google/apis/autoscaler_v1beta2/classes.rb', line 205 def metric @metric end |
#utilization_target ⇒ Float
Target value of the metric which Autoscaler should maintain. Must be a
positive value.
Corresponds to the JSON property utilizationTarget
211 212 213 |
# File 'generated/google/apis/autoscaler_v1beta2/classes.rb', line 211 def utilization_target @utilization_target end |
#utilization_target_type ⇒ String
Defines type in which utilization_target is expressed.
Corresponds to the JSON property utilizationTargetType
216 217 218 |
# File 'generated/google/apis/autoscaler_v1beta2/classes.rb', line 216 def utilization_target_type @utilization_target_type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
223 224 225 226 227 |
# 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 |