Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List objects using S3Template #767

Closed
ooraini opened this issue Apr 18, 2023 · 4 comments
Closed

List objects using S3Template #767

ooraini opened this issue Apr 18, 2023 · 4 comments
Labels
component: s3 S3 integration related issue status: ideal-for-contribution We agree it's nice to have but it is not team priority type: enhancement Smaller enhancement in existing integration
Milestone

Comments

@ooraini
Copy link

ooraini commented Apr 18, 2023

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.

@maciejwalkowiak
Copy link
Contributor

@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 maciejwalkowiak added component: s3 S3 integration related issue type: enhancement Smaller enhancement in existing integration labels Apr 18, 2023
@maciejwalkowiak maciejwalkowiak added this to the 3.x milestone Apr 18, 2023
@ooraini
Copy link
Author

ooraini commented Apr 18, 2023

@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?

@maciejwalkowiak
Copy link
Contributor

Sounds good!

@maciejwalkowiak maciejwalkowiak added the status: ideal-for-contribution We agree it's nice to have but it is not team priority label May 10, 2023
@maciejwalkowiak
Copy link
Contributor

Fixed in #831

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: s3 S3 integration related issue status: ideal-for-contribution We agree it's nice to have but it is not team priority type: enhancement Smaller enhancement in existing integration
Projects
None yet
Development

No branches or pull requests

2 participants