Class: Google::Apis::ComputeV1::AutoscalingPolicyCustomMetricUtilization
- Inherits:
-
Object
- Object
- Google::Apis::ComputeV1::AutoscalingPolicyCustomMetricUtilization
- Defined in:
- generated/google/apis/compute_v1/classes.rb,
generated/google/apis/compute_v1/representations.rb,
generated/google/apis/compute_v1/representations.rb
Overview
Custom utilization metric policy.
Instance Attribute Summary collapse
-
#metric ⇒ String
The identifier of the Stackdriver Monitoring metric.
-
#utilization_target ⇒ Float
Target value of the metric which autoscaler should maintain.
-
#utilization_target_type ⇒ String
Defines how target utilization value is expressed for a Stackdriver Monitoring metric.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AutoscalingPolicyCustomMetricUtilization
constructor
A new instance of AutoscalingPolicyCustomMetricUtilization.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ AutoscalingPolicyCustomMetricUtilization
Returns a new instance of AutoscalingPolicyCustomMetricUtilization.
917 918 919 |
# File 'generated/google/apis/compute_v1/classes.rb', line 917 def initialize(**args) update!(**args) end |
Instance Attribute Details
#metric ⇒ String
The identifier 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 also have a label of compute.
googleapis.com/resource_id with the value of the instance's unique ID,
although this alone does not guarantee that the metric is valid.
For example, the following is a valid metric:
compute.googleapis.com/instance/network/received_bytes_count
The following is not a valid metric because it does not increase or decrease
based on usage:
compute.googleapis.com/instance/cpu/reserved_cores
Corresponds to the JSON property metric
902 903 904 |
# File 'generated/google/apis/compute_v1/classes.rb', line 902 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
908 909 910 |
# File 'generated/google/apis/compute_v1/classes.rb', line 908 def utilization_target @utilization_target end |
#utilization_target_type ⇒ String
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
915 916 917 |
# File 'generated/google/apis/compute_v1/classes.rb', line 915 def utilization_target_type @utilization_target_type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
922 923 924 925 926 |
# File 'generated/google/apis/compute_v1/classes.rb', line 922 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 |