OptionalendpointThe account-specific R2 S3 endpoint, e.g.
https://<account_id>.r2.cloudflarestorage.com. Required unless a
pre-built client is supplied.
OptionalcredentialsR2 access-key credentials (created in the Cloudflare dashboard as an "R2
API Token"). Omit only when supplying a pre-built client.
OptionalregionRegion to advertise to the SDK. R2 has no regions and expects the
sentinel value 'auto'; this defaults to 'auto' and rarely needs
changing.
OptionalclientA pre-built S3Client (or compatible object). When provided,
connect() uses it directly and does NOT require the SDK — this is how
tests inject a mock client, and how callers can supply a custom-configured
client. When omitted, connect() builds a real S3Client pointed at R2
from the options above.
Connection options for
R2Store.