Quota
This page is auto-generated from the formations OpenAPI spec. Do not edit manually — run
pnpm generate-formations-resource-docsto regenerate.
Creates a quota — a project-scoped cap that blocks (enforce) or reports (monitor) when a windowed aggregate is exceeded. requests quotas are enforced by the request middleware; tokens/cost_usd quotas at the pre-generation check. Mirrors the quotas REST contract; scope, metric, and window are immutable after creation (only limit and mode update).
Syntax
type: quota
properties:
scope: String
scope_ref: String
metric: String
window: String
limit: Number
mode: String
Output
The physical resource ID is the public ID of the created resource. Reference it from other resources with a ref expression:
some_field:
ref: MyQuota
Properties
scope
The scope the quota applies to
Required: Yes Type: String
scope_ref
Public id of the api key / agent / actor the quota applies to. NULL means all entities of that scope type in the project — for actor scope that is one budget per actor, not a pooled total.
Required: No Type: String Nullable: Yes
metric
The metric being capped
Required: Yes Type: String
window
The window over which the metric is aggregated
Required: Yes Type: String
limit
The cap. Positive integer for requests/tokens; fractional allowed for cost_usd.
Required: Yes Type: Number
mode
enforce blocks with 429; monitor fires the webhook only
Required: No Type: String