docs: public static void main(String[] args)
      throws IOException, NoSuchAlgorithmException, InvalidKeyException, XmlPullParserException {
      try {
        /* Local MinIO for test and development. */
        MinioClient minioClient = new MinioClient("http://127.0.0.1:9000", "YOUR-ACCESSKEYID", "YOUR-SECRETKEY");
  
        /* Amazon S3: */
        // MinioClient minioClient = new MinioClient("https://s3.amazonaws.com", "YOUR-ACCESSKEYID",
        //                                           "YOUR-SECRETACCESSKEY");
  
        // Get current notification configuration.
        NotificationConfiguration notificationConfiguration = minioClient.getBucketNotification("my-bucketname");
  
        // Add a new SQS configuration.
        List<QueueConfiguration> queueConfigurationList = notificationConfiguration.queueConfigurationList();
        QueueConfiguration queueConfiguration = new QueueConfiguration();
        queueConfiguration.setQueue("arn:minio:sqs::1:webhook");
  
        List<EventType> eventList = new LinkedList<>();
        eventList.add(EventType.OBJECT_CREATED_PUT);
        eventList.add(EventType.OBJECT_CREATED_COPY);
        queueConfiguration.setEvents(eventList);
  
        Filter filter = new Filter();
        filter.setPrefixRule("images");
        filter.setSuffixRule("pg");
        queueConfiguration.setFilter(filter);
  
        queueConfigurationList.add(queueConfiguration);
        notificationConfiguration.setQueueConfigurationList(queueConfigurationList);
  
        // Set updated notification configuration.
        minioClient.setBucketNotification("my-bucketname", notificationConfiguration);
        System.out.println("Bucket notification is set successfully");
      } catch (MinioException e) {
        System.out.println("Error occurred: " + e);
      }
    }