Send feedback
MetricRule
Stay organized with collections
Save and categorize content based on your preferences.
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" }
.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-08-13 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?