S3Client¶
Entry point for interacting with Amazon S3. Wraps an S3AsyncClient and an
S3TransferManager, providing bucket-level operations and a shared thread pool
for asynchronous transfers.
Constructor¶
Creates a new S3Client backed by the given async client. A default thread pool
and S3TransferManager are created automatically.
Example:
S3AsyncClient asyncClient = S3AsyncClient.builder().build();
S3Client s3 = new S3Client(asyncClient);
S3Bucket bucket = s3.getBucket("my-bucket");
Catalog catalog = bucket.as(Catalog.class);
Methods¶
createBucket¶
Creates a new S3 bucket with the given name and returns it.
getBucket¶
Returns the bucket with the given name.
Throws: NoSuchBucketException if no bucket with that name exists.
buckets¶
Returns all buckets visible to the configured AWS credentials.
getS3¶
Returns the underlying AWS async S3 client.
getTransferManager¶
Returns the S3TransferManager used for upload and download operations.