istio.io/content/docs/reference/config/policy-and-telemetry/templates/quota/index.html

56 lines
2.0 KiB
HTML

---
title: Quota
description: A template that represents a quota allocation request.
location: https://istio.io/docs/reference/config/policy-and-telemetry/templates/quota.html
layout: protoc-gen-docs
generator: protoc-gen-docs
aliases:
- /docs/reference/config/template/quota.html
number_of_entries: 1
---
<p>The <code>quota</code> template represents an item for which to check quota.</p>
<p>Example config:</p>
<pre><code class="language-yaml">apiVersion: &quot;config.istio.io/v1alpha2&quot;
kind: quota
metadata:
name: requestcount
namespace: istio-system
spec:
dimensions:
source: source.labels[&quot;app&quot;] | source.service | &quot;unknown&quot;
sourceVersion: source.labels[&quot;version&quot;] | &quot;unknown&quot;
destination: destination.labels[&quot;app&quot;] | destination.service | &quot;unknown&quot;
destinationVersion: destination.labels[&quot;version&quot;] | &quot;unknown&quot;
</code></pre>
<h2 id="Template">Template</h2>
<section>
<p>The <code>quota</code> template represents a piece of data to check Quota for.</p>
<p>When writing the configuration, the value for the fields associated with this template can either be a
literal or an <a href="/docs/reference//config/policy-and-telemetry/expression-language/">expression</a>. Please note that if the datatype of a field is not istio.policy.v1beta1.Value,
then the expression&rsquo;s <a href="/docs/reference//config/policy-and-telemetry/expression-language/#type-checking">inferred type</a> must match the datatype of the field.</p>
<table class="message-fields">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr id="Template-dimensions">
<td><code>dimensions</code></td>
<td><code>map&lt;string,&nbsp;<a href="/docs/reference/config/policy-and-telemetry/istio.policy.v1beta1.html#Value">istio.policy.v1beta1.Value</a>&gt;</code></td>
<td>
<p>The unique identity of the particular quota to manipulate.</p>
</td>
</tr>
</tbody>
</table>
</section>