Rotate an object cache bucket's credentials

Replace the bucket's own access keys, or create the first ones. The object cache must be running or degraded. The old keys keep working for grace_seconds.

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

The ID of the object cache.

id string required

The ID of the object cache bucket to rotate.

Authorization string required

Bearer $TOKEN

Content-Type string

application/json

grace_seconds integer default: 86400

How long the old keys keep working, in seconds, from 0 to 86400. Defaults to 86400, one day. Send 0 to stop them at once.

202 Accepted
{
  "bucket": "example",
  "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 bucket's new access keys and the object cache's URLs as one object.

bucket string

The bucket's name.

access_key_id string

The bucket's new access key ID.

secret_access_key string

The bucket's new secret access key.

endpoints array of strings

The object cache's URLs, a private HTTP URL and a public HTTPS URL.

previous_access_key_id string or null

The previous access key ID, which still works until rotating_until, or null when no rotation is in progress.

rotating_until datetime or null

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

usage string

An example AWS CLI command that lists the bucket. Clients must send the bucket name in the URL path.