Ambassador · Schema
RateLimitRule
A single rate limiting rule with a pattern and rate
API DevelopmentGatewaysIngressKubernetesMock ServersMocksPlatformTesting
Properties
| Name | Type | Description |
|---|---|---|
| pattern | array | Descriptor entries to match against. Each entry is a key-value pair that must match the labels sent with the request. |
| rate | integer | Maximum number of requests allowed in the specified unit of time |
| unit | string | Time unit for the rate limit |
| injectRequestHeaders | array | Headers to inject into the request when the rate limit is applied |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/RateLimitRule",
"title": "RateLimitRule",
"type": "object",
"description": "A single rate limiting rule with a pattern and rate",
"required": [
"pattern",
"rate"
],
"properties": {
"pattern": {
"type": "array",
"description": "Descriptor entries to match against. Each entry is a key-value pair that must match the labels sent with the request.",
"items": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"example": [
{
"generic_key": "my-rate-limit"
}
]
},
"rate": {
"type": "integer",
"description": "Maximum number of requests allowed in the specified unit of time",
"minimum": 1,
"example": 10
},
"unit": {
"type": "string",
"description": "Time unit for the rate limit",
"enum": [
"second",
"minute",
"hour",
"day"
],
"default": "minute",
"example": "second"
},
"injectRequestHeaders": {
"type": "array",
"description": "Headers to inject into the request when the rate limit is applied",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"example": []
}
}
}