Skip to main content

setAppComputeBudget

Set an app's compute allowance in units per minute, spanning the model expression engine and both WASM tiers. One unit is one millisecond of measured execution time. An over-ceiling value is REFUSED naming the ceiling (6000000 units per minute) rather than accepted and clamped, so the value reported back is always the value in force. Set enforce to true to refuse invokes when the allowance is exceeded; leave it false to record the decision and admit, which is what produces the measurements a threshold should be chosen from. Requires app-admin ('manage_apps').

setAppComputeBudget(
appId: BigInt!
unitsPerMinute: Int!
enforce: Boolean = false
note: String
): AppComputeBudgetInfo!

Arguments

setAppComputeBudget.appId ● BigInt! non-null scalar

The app (tenant) to set an allowance for.

setAppComputeBudget.unitsPerMinute ● Int! non-null scalar

Compute units per minute; a positive integer no greater than 6000000.

setAppComputeBudget.enforce ● Boolean scalar

True to refuse model invokes once the allowance is exceeded. False (the default) records the decision and admits.

setAppComputeBudget.note ● String scalar

Why this number was chosen. Recorded so the next operator can change it safely.

Type

AppComputeBudgetInfo object

An app's compute allowance in units per minute, spanning the expression engine and both WASM tiers. Absent when no allowance has been set for the app, in which case the app is measured against the platform reference allowance and is never refused.