Package io.minio

Class MinioClient

java.lang.Object
io.minio.S3Base
io.minio.MinioClient

public class MinioClient extends S3Base
Simple Storage Service (aka S3) client to perform bucket and object operations.

Bucket operations

  • Create, list and delete buckets.
  • Put, get and delete bucket lifecycle configuration.
  • Put, get and delete bucket policy configuration.
  • Put, get and delete bucket encryption configuration.
  • Put and get bucket default retention configuration.
  • Put and get bucket notification configuration.
  • Enable and disable bucket versioning.

Object operations

  • Put, get, delete and list objects.
  • Create objects by combining existing objects.
  • Put and get object retention and legal hold.
  • Filter object content by SQL statement.

If access/secret keys are provided, all S3 operation requests are signed using AWS Signature Version 4; else they are performed anonymously.

Examples on using this library are available here.

Use MinioClient.builder() to create S3 client.


 // Create client with anonymous access.
 MinioClient minioClient = MinioClient.builder().endpoint("https://play.min.io").build();

 // Create client with credentials.
 MinioClient minioClient =
     MinioClient.builder()
         .endpoint("https://play.min.io")
         .credentials("Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG")
         .build();