Usage Rotation Without Usage Limit
URI: https://docs.ankatech.co/errors/usage-rotation-without-usage-limit
HTTP Status: 422 Unprocessable Content
When you see this
A key's rotation schedule was written turning rotateOnUsageExhaustion on (from false), and the key's current material has no maximum usage limit (maxUsageLimit absent or 0, which means unlimited). Nothing was stored: the key's schedule is unchanged.
The option rotates the key when its usage count reaches its maximum usage limit. The usage of an uncapped key is never exhausted, so the option could never act.
The check runs after the soft-limit check.
Response Example
{
"type": "https://docs.ankatech.co/errors/usage-rotation-without-usage-limit",
"title": "Usage Rotation Without Usage Limit",
"status": 422,
"detail": "rotateOnUsageExhaustion: the key has no maximum usage limit, so its usage can never be exhausted. Set a maximum usage limit on the key first, or send false.",
"instance": "/api/v3/admin/tenants/550e8400-e29b-41d4-a716-446655440000/keys/payments-data-key/rotation-schedule",
"timestamp": 1790000000,
"extensions": {
"requestId": "c4a8e2f1-6b3d-4970-a1e5-8f0d9b2c6e17"
}
}
Content-Type: application/problem+json — the response follows RFC 9457 Problem Details. The detail names the option and the remedy, never the key or the tenant.
How to Resolve
- Set a maximum usage limit on the key with the metadata update (
PATCH /api/v3/admin/tenants/{tenantId}/keys/{kid}, a positivemaxUsageLimitabove the uses already counted), then write the schedule again. - Or send
rotateOnUsageExhaustion: falseand keep the key on a time-based cadence.
An option stored before a later metadata update removed the maximum is kept: it acts on nothing until the key has a maximum again.
Operations that emit it
| Method | Endpoint |
|---|---|
| PUT | /api/v3/admin/tenants/{tenantId}/keys/{kid}/rotation-schedule |
Related Errors
- Usage Rotation Without Soft Limit (422) - the same refusal for
rotateOnSoftUsageLimiton a key with no soft usage limit - Key Material Usage Exhausted (409) - what a capped key answers to an encryption or a signature once its maximum is reached
For full schema definitions, examples, and interactive testing, see the Developer Hub Reference.