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.

JSON representation
{
  "selector": string,
  "metricCosts": {
    string: string,
    ...
  }
}
Fields
selector

string

Selects the methods to which this rule applies.

Refer to selector for syntax details.

metricCosts

map (key: string, value: string (int64 format))

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.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.