CostControlAction interface

Blocks requests when consumption reaches the explicitly configured threshold. No implicit blocking action is created.

Properties

operator

The threshold comparison. Only GreaterThanOrEqualTo is supported.

threshold

The positive threshold. Percentages cannot exceed 100; absolute thresholds cannot exceed amount and must be whole numbers for Tokens budgets.

thresholdType

Whether threshold is a percentage of amount or an absolute value in the budget's unit.

type

The enforcement action. Only Block is supported.

Property Details

operator

The threshold comparison. Only GreaterThanOrEqualTo is supported.

operator: "GreaterThanOrEqualTo"

Property Value

"GreaterThanOrEqualTo"

threshold

The positive threshold. Percentages cannot exceed 100; absolute thresholds cannot exceed amount and must be whole numbers for Tokens budgets.

threshold: number

Property Value

number

thresholdType

Whether threshold is a percentage of amount or an absolute value in the budget's unit.

thresholdType: string

Property Value

string

type

The enforcement action. Only Block is supported.

type: "Block"

Property Value

"Block"