Class: Google::Apis::AppengineV1beta::CustomMetric
- Inherits:
-
Object
- Object
- Google::Apis::AppengineV1beta::CustomMetric
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/appengine_v1beta/classes.rb,
lib/google/apis/appengine_v1beta/representations.rb,
lib/google/apis/appengine_v1beta/representations.rb
Overview
Allows autoscaling based on Stackdriver metrics.
Instance Attribute Summary collapse
-
#filter ⇒ String
Allows filtering on the metric's fields.
-
#metric_name ⇒ String
The name of the metric.
-
#single_instance_assignment ⇒ Float
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.
-
#target_type ⇒ String
The type of the metric.
-
#target_utilization ⇒ Float
The target value for the metric.
Instance Method Summary collapse
-
#initialize(**args) ⇒ CustomMetric
constructor
A new instance of CustomMetric.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ CustomMetric
Returns a new instance of CustomMetric.
724 725 726 |
# File 'lib/google/apis/appengine_v1beta/classes.rb', line 724 def initialize(**args) update!(**args) end |
Instance Attribute Details
#filter ⇒ String
Allows filtering on the metric's fields.
Corresponds to the JSON property filter
698 699 700 |
# File 'lib/google/apis/appengine_v1beta/classes.rb', line 698 def filter @filter end |
#metric_name ⇒ String
The name of the metric.
Corresponds to the JSON property metricName
703 704 705 |
# File 'lib/google/apis/appengine_v1beta/classes.rb', line 703 def metric_name @metric_name end |
#single_instance_assignment ⇒ Float
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
711 712 713 |
# File 'lib/google/apis/appengine_v1beta/classes.rb', line 711 def single_instance_assignment @single_instance_assignment end |
#target_type ⇒ String
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
717 718 719 |
# File 'lib/google/apis/appengine_v1beta/classes.rb', line 717 def target_type @target_type end |
#target_utilization ⇒ Float
The target value for the metric.
Corresponds to the JSON property targetUtilization
722 723 724 |
# File 'lib/google/apis/appengine_v1beta/classes.rb', line 722 def target_utilization @target_utilization end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
729 730 731 732 733 734 735 |
# 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 |