FeatureRecipe
period-budget-azure-api-management
Realizes core/period-budget on core/gateway/azure-api-management's terraform Recipe; a Release binds it in its Manifest. It writes one token limit into the API's policy and emits no file. The gateway counts the prompt and completion tokens each reply reports, together, and prices nothing: past a quota over an hour, a day, a week, a month or a year, each a fixed window on the UTC clock, it answers HTTP 403 until the window ends, and past a rate over one minute HTTP 429. So it honours unit total_tokens, a period of 1h, 1d, 7d, 1mo, 12mo or 1m, and a whole-number limit, for everything the API serves or for each API Management subscription, and refuses the rest by name. It counts after a reply arrives, so concurrent requests can pass the limit, and keeps a separate count at each gateway of the instance. It halts on any component other than core/gateway/azure-api-management. That the policy applies and refuses as described is Microsoft's documented behaviour on every tier but Consumption, and no build observes it.
المنشأ
- ملخّص المحتوى
- sha256:2976e3b90d16b59c30cc188837241fae16ca097828c3c6759f52057839a000f9
- تاريخ الطرح
- 2026-11-10T10:16:45Z
- هوية التوقيع
- https://token.actions.githubusercontent.com/https://github.com/aggrega-ai/aggrega-hub/.github/workflows/catalog-publish-sign.yml@refs/heads/main
التوقيع
- رسميapplication/vnd.dev.sigstore.bundle.v0.3+json
https://token.actions.githubusercontent.com/https://github.com/aggrega-ai/aggrega-hub/.github/workflows/catalog-publish-sign.yml@refs/heads/main
sha256:a29c62aa97fad58b5f802808ce6f9b77787b5540d867f779945dbfee3794d111
المرجع في هذا الإصدار
oci://hub.aggrega.ai/featurerecipe/terraform/period-budget-azure-api-management:1.0.0- الهدف
- —
- ينفّذ
- core/period-budget:1.0.0
Provides
قوالب مؤشرات حتمية يوصلها هذا Recipe للمستهلكين.
لم تُعلن أي قوالب provides.
تعيين inject
{{- $key := printf "context.Api.Id + \"/%s\"" .attachment_name }}
{{- if eq .values.scope "caller" }}{{ $key = printf "context.Api.Id + \"/%s/\" + context.Subscription.Id" .attachment_name }}{{ end }}
azure_api_management:
token_limit.{{ .attachment_name }}: {{ printf "<llm-token-limit counter-key=\"@(%s)\" %s estimate-prompt-tokens=\"false\" />" $key .locals.limit_attributes | toJson }}
{{- if eq .values.scope "caller" }}
subscription_scoped.{{ .attachment_name }}: "core/period-budget"
{{- end }}
Workload
لم يُعلن أي قالب لحمل العمل.
Locals
| الاسم | القالب |
|---|---|
| limit_attributes | {{- $quota := dict "1h" "Hourly" "1d" "Daily" "7d" "Weekly" "1mo" "Monthly" "12mo" "Yearly" -}} {{- $limit := printf "%.0f" (float64 .infra.limit) -}} {{- if hasKey $quota .infra.period -}} {{- printf "token-quota=\"%s\" token-quota-period=\"%s\"" $limit (index $quota .infra.period) -}} {{- else if eq .infra.period "1m" -}} {{- printf "tokens-per-minute=\"%s\"" $limit -}} {{- end -}} |
تعيين values
لم يُعلن أي تعيين values.
العلاقات
حواف مصنَّفة بالنوع من الكيانات المطروحة الأخرى وإليها. المرجع الذي لا هدف مطروحًا له يُعرض بوصفه حافة مكسورة لا رابطًا.
يستخدم
- ينفّذينفّذ
core/period-budget:1.0.0
يستخدمه
لا يعتمد أي شيء في الكتالوج على هذا الكيان.