是否可以使用Spring Cloud for AWS通过前缀过滤存储桶?

问题描述

我正在尝试使用Spring Cloud for AWS列出我的存储桶,但我想将存储桶过滤为LIKE运算符。

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-aws</artifactId>
        </dependency>

版本:2.2.1。发布

amazonS3Client.listBuckets();

但是我想做这样的事情,但是不需要获取所有存储桶然后进行过滤。

amazonS3Client.listBuckets().stream().filter(bucket -> bucket.getName().contains("filter-key")).collect(Collectors.toList());

有可能吗?

预先感谢

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)