spring-cloud-aws
spring-cloud-aws copied to clipboard
List objects using S3Template
Type: Feature
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] I can almost exclusively use the S3Template class, but I sometimes need to list objects with a certain prefix. Maybe this use case is common enough to be placed in S3Template.
Describe the solution you'd like A clear and concise description of what you want to happen.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.
@ooraini I am guessing you mean putting the functionality described here https://docs.awspring.io/spring-cloud-aws/docs/3.0.0-SNAPSHOT/reference/html/index.html#searching-resources into S3Template? I think it makes sense. You're welcome to submit a PR!
@maciejwalkowiak Oh wow, I didn't notice S3PathMatchingResourcePatternResolver
. I guess now I'm not sure if it's worth it to introduce a new method. I guess if we do, then we shouldn't just expose S3PathMatchingResourcePatternResolver
as is. In the spirit of making the common case easy, we might add the following method to S3Template:
List<S3Resource> listObjects(String bucket, String prefix) {}
Not as capable as S3PathMatchingResourcePatternResolver
and no pagination support, if you need either, use S3Client
or S3PathMatchingResourcePatternResolver
. What do you think?
Sounds good!