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

Add content() to s3Client.getObject(getObjectRequest).response() and return S3Object #2371

Closed
1 task
eddumelendez opened this issue Apr 3, 2021 · 1 comment
Labels
feature-request A feature should be added or improved.

Comments

@eddumelendez
Copy link

eddumelendez commented Apr 3, 2021

Currently, I am working on spring cloud aws integration with s3, moving the existing implementation from sdk v1 to v2 and I would like to perform some operations in a friendly way. In this case, if the user is working with objects use S3Object instead of *Response classes.

The sdk allow me to do this in order to get a list of s3 objects this.s3Client.listObjects(listObjectsRequest).contents() which returns List<S3Object>. However, when try this.s3Client.getObject(getObjectRequest).response() there is no method that returns S3Object, instead it provides a metadata() method.

Describe the Feature

Is your Feature Request related to a problem?

Proposed Solution

In order to have consistency between operations would be great that this.s3Client.getObject(getObjectRequest) provides content() which returns S3Object

Describe alternatives you've considered

Additional Context

  • I may be able to implement this feature request

Your Environment

  • AWS Java SDK version used: 2.16.1
  • JDK version used: 11
  • Operating System and version:
@eddumelendez eddumelendez added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Apr 3, 2021
@debora-ito
Copy link
Member

Hi @eddumelendez, the SDK v2 clients are generated based on service models, this change would need to come from S3. In v1 the S3 client was hand-written so we didn't have this restriction.

It would be good to see consistency between operations, but I don't think this is something S3 can change now unfortunately. I'll go ahead and close this. Thank you for reaching out.

@debora-ito debora-ito removed the needs-triage This issue or PR still needs to be triaged. label Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved.
Projects
None yet
Development

No branches or pull requests

2 participants