class Google::Apis::ServicenetworkingV1beta::MetricRule
Bind API methods to metrics. Binding a method to a metric causes that metric's configured quota behaviors to apply to the method call.
Attributes
metric_costs[RW]
Metrics to update when the selected methods are called, and the associated cost applied to each metric. The key of the map is the metric name, and the values are the amount increased for the metric against which the quota limits are defined. The value must not be negative. Corresponds to the JSON property `metricCosts` @return [Hash<String,Fixnum>]
selector[RW]
Selects the methods to which this rule applies. Refer to selector for syntax details. Corresponds to the JSON property `selector` @return [String]
Public Class Methods
new(**args)
click to toggle source
# File lib/google/apis/servicenetworking_v1beta/classes.rb, line 2217 def initialize(**args) update!(**args) end
Public Instance Methods
update!(**args)
click to toggle source
Update properties of this object
# File lib/google/apis/servicenetworking_v1beta/classes.rb, line 2222 def update!(**args) @metric_costs = args[:metric_costs] if args.key?(:metric_costs) @selector = args[:selector] if args.key?(:selector) end