Rotate an object cache's credentials

Create new S3 keys for the object cache. The previous keys keep working for grace_seconds. The object cache must be running or degraded.

POST https://{availability_zone}.betterstackcloud.com/v1/object-proxies/{id}/credentials/rotate
id string required

The ID of the object cache to rotate.

Authorization string required

Bearer $TOKEN

Content-Type string

application/json

grace_seconds integer default: 86400

How long the previous keys keep working, in seconds, from 0 to 86400. Send 0 when the keys leaked, so they stop working as soon as we apply the new ones.

202 Accepted
{
  "access_key_id": "123456789",
  "secret_access_key": "example",
  "endpoints": [
    "example"
  ],
  "previous_access_key_id": "123456789",
  "rotating_until": "2026-07-01T12:00:00.000Z",
  "usage": "example"
}

Returns the new keys and the endpoint URLs as one object.

access_key_id string

The new access key ID.

secret_access_key string

The new secret access key.

endpoints array of strings

The endpoint URLs, an HTTP URL in each attached network and the public HTTPS URL when public_access is on.

previous_access_key_id string or null

The previous access key ID, which keeps working until rotating_until, or null when grace_seconds is 0.

rotating_until datetime or null

When the previous key stops working. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

usage string

An example command for the AWS CLI. Clients must use path-style addressing.