Skip to main content

SetQuotaInput

No description

input SetQuotaInput {
orgId: BigInt
appId: BigInt
tierId: BigInt
metric: String!
limitValue: BigInt!
period: String
actionOnExceed: String
idempotencyKey: String
}

Fields

SetQuotaInput.orgId ● BigInt scalar

Scope the rule to this organization (BigInt as a decimal string). Provide one of orgId/appId/tierId to choose the scope; omit all three for a global (super-admin) rule.

SetQuotaInput.appId ● BigInt scalar

Scope the rule to this app (BigInt as a decimal string).

SetQuotaInput.tierId ● BigInt scalar

Scope the rule to this access tier (BigInt as a decimal string).

SetQuotaInput.metric ● String! non-null scalar

The metered resource key to limit (max 64 characters), e.g. "api_requests".

SetQuotaInput.limitValue ● BigInt! non-null scalar

Maximum allowed amount of the metric per period, as a BigInt decimal string.

SetQuotaInput.period ● String scalar

Time window the limit applies over. Optional; defaults to "per_minute" (typical values: "per_minute", "per_hour", "per_day"). Part of the upsert key, so different periods create separate rules.

SetQuotaInput.actionOnExceed ● String scalar

What to do when the limit is exceeded. Optional; defaults to "throttle" (typical values: "throttle" to rate-limit, "block" to reject).

SetQuotaInput.idempotencyKey ● String scalar

Optional idempotency key. Recommended for retries: replaying with the same key and identical input returns the first result instead of re-applying; the same key with different input returns IDEMPOTENCY_CONFLICT. Keys expire after 24h.

Member Of

setQuota mutation