Halaman ini diterjemahkan oleh mesin. Baca versi asli dalam bahasa Inggris.

FeatureRecipe

period-budget-cloudflare-ai-gateway

Realizes core/period-budget on core/gateway/cloudflare-ai-gateway's terraform Recipe; a Release binds it in its Manifest. It writes one spend-limit rule into the gateway's own resource and emits no file. The gateway counts what its traffic cost in US dollars, priced from the pricing it keeps per model, over a window that moves forward with time: the last period, written as a number of seconds. Once the count reaches limit it answers further model requests with HTTP 429 until the window has moved on. It records a request's cost once the request completes, so concurrent requests can take it past limit before the first refusal, and it counts only models whose pricing it knows. So it honours unit usd, scope gateway and a period of seconds, minutes, hours or days, and refuses tokens, a budget per caller or per model, and calendar months by name. It halts when the attachment is carried by any component other than core/gateway/cloudflare-ai-gateway, and when a gateway carries more rules than the 20 Cloudflare keeps. That the gateway reads the window in seconds, and refuses as described, is Cloudflare's documented behaviour and no build observes it.

Asal-usul

ResmiDitandatangani oleh identitas penandatangan yang diakui katalog ini sebagai penerbit resmi.
Digest konten
sha256:6f38e7756f2b9f186dbd9d365c449e8d035b266c02d54405dc762d9b6fcf85aa
Dipublikasikan
2026-11-10T10:16:46Z
Identitas penandatangan
https://token.actions.githubusercontent.com/https://github.com/aggrega-ai/aggrega-hub/.github/workflows/catalog-publish-sign.yml@refs/heads/main

Tanda tangan

  • Resmiapplication/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:4f69ad8dbc83038f97e9d7dd5d256ac6c47e5246effd91bd1c0f1d79de5811d4

Referensi pada versi ini

oci://hub.aggrega.ai/featurerecipe/terraform/period-budget-cloudflare-ai-gateway:1.0.0
Target
—
Mengimplementasikan
core/period-budget:1.0.0

Menyediakan

Templat pointer deterministik yang dihubungkan resep ini untuk konsumen.

Tidak ada templat provides yang dideklarasikan.

Pemetaan injeksi

cloudflare_ai_gateway:
  spend_limit_rule.{{ .attachment_name }}: {{ printf "{ id = %q, limit = %v, limit_type = \"cost\", window = %s, technique = \"sliding\" }" .attachment_name .infra.limit .locals.window_seconds | toJson }}

Workload

Tidak ada templat beban kerja yang dideklarasikan.

Nilai lokal

NamaTemplat
window_seconds{{- $count := atoi (regexFind "^[0-9]+" .infra.period) -}} {{- $unit := regexFind "[a-z]+
quot; .infra.period -}} {{- $seconds := dict "s" 1 "m" 60 "h" 3600 "d" 86400 -}} {{- if hasKey $seconds $unit -}}{{- mul $count (index $seconds $unit) -}}{{- end -}}

Pemetaan values

Tidak ada pemetaan values yang dideklarasikan.

Relasi

Sisi bertipe ke dan dari entitas lain yang dipublikasikan. Referensi tanpa target yang dipublikasikan ditampilkan sebagai sisi yang terputus, bukan sebagai tautan.

Menggunakan

Digunakan oleh

Tidak ada apa pun di katalog yang bergantung pada entitas ini.

Referensi konsep FeatureRecipe →

Katalog Aggrega — indeks terbuka berisi komponen, fitur, resep, dan plugin yang merendernya.

Dibangun dengan sistem desain Aggrega yang digunakan bersama.

Privasi