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

Parse QueryParams when building S3Uri from AWS CLI Style format #5246

Closed
1 of 2 tasks
itisam opened this issue May 27, 2024 · 3 comments
Closed
1 of 2 tasks

Parse QueryParams when building S3Uri from AWS CLI Style format #5246

itisam opened this issue May 27, 2024 · 3 comments
Assignees
Labels
feature-request A feature should be added or improved. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days.

Comments

@itisam
Copy link

itisam commented May 27, 2024

Describe the feature

Seems like query parameters are not parsed when building an S3Uri from aws cli style uris e.g. s3://bucket/key?versionId=.

Use Case

Currently it seems I cannot build an S3Uri containing a versionId using S3Utilities when my uris are under s3 scheme (e.g. s3://bucket/key?versionId=). However, when the same uri is under http scheme, the same class will build the query parameters correctly. I think the library should support passing query parameters with cli style uris.

Proposed Solution

method

...
Map<String, List<String>> queryParams = new HashMap<>();

if (uri.getQuery() != null) {
    queryParams.addAll(SdkHttpUtils.uriParams(uri));
}

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS Java SDK version used

2

JDK version used

20

Operating System and version

macOS

@itisam itisam added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels May 27, 2024
@debora-ito
Copy link
Member

@itisam Is s3://bucket/key?versionId= a valid S3 URI though?

According to the aws console, the versionId is part of the object url (as in https://bucket.s3.us-west-2.amazonaws.com/key?versionId=abc), but not of the S3 URI. Is there any documentation that mentions the versionId in the S3 URI?

@debora-ito debora-ito added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days. and removed needs-triage This issue or PR still needs to be triaged. labels May 28, 2024
@debora-ito debora-ito self-assigned this May 28, 2024
@itisam
Copy link
Author

itisam commented May 29, 2024

@itisam Is s3://bucket/key?versionId= a valid S3 URI though?

According to the aws console, the versionId is part of the object url (as in https://bucket.s3.us-west-2.amazonaws.com/key?versionId=abc), but not of the S3 URI. Is there any documentation that mentions the versionId in the S3 URI?

You are right, this may not be a valid s3 uri (confirmed with aws console that it didn't work). But would def be helpful if versionIds could also work with s3 URIs.

Closing the issue then.

@itisam itisam closed this as completed May 29, 2024
Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

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. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days.
Projects
None yet
Development

No branches or pull requests

2 participants