aws-sdk-java-v2
aws-sdk-java-v2 copied to clipboard
Async S3 Client Presigned Url Download API
Motivation and Context
Modifications
- New handwritten request POJO
PresignedDownloadRequestand corresponding marshaller - New
SdkInternalExecutionAttribute:PRESIGNED_URL - Added
CustomSdkOperationsandCustomSdkOperationsProcessorto add customPresignedDownloadoperation to S3 customization config - Updated codegen logic to handle custom operation with input having
fqcnandmarshallerFqcn - Updated protocol specs to use custom request type and marshaller, and add presigned url
ExecutionAttribute - Skipping sync client for now, will revisit
- Updated
AuthSchemeInterceptorSpecto useNoAuthAuthSchemeif presigned url operation - Updated
RequestEndpointInterceptorSpecto skip setting endpoint if presigned url operation
Testing
- Added customization to codegen test models and updated generated classes
- Added S3 Integ tests
- To add unit tests in follow up PRs
Screenshots (if appropriate)
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
Checklist
- [ ] I have read the CONTRIBUTING document
- [ ] Local run of
mvn installsucceeds - [ ] My code follows the code style of this project
- [ ] My change requires a change to the Javadoc documentation
- [ ] I have updated the Javadoc documentation accordingly
- [ ] I have added tests to cover my changes
- [ ] All new and existing tests passed
- [ ] I have added a changelog entry. Adding a new entry must be accomplished by running the
scripts/new-changescript and following the instructions. Commit the new file created by the script in.changes/next-releasewith your changes. - [ ] My change is to implement 1.11 parity feature and I have updated LaunchChangelog
License
- [ ] I confirm that this pull request can be released under the Apache 2 license
Quality Gate failed
Failed conditions
64.3% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)
See analysis details on SonarCloud
Catch issues before they fail your Quality Gate with our IDE extension
SonarLint
Overall I was thinking we should try to be consistent with the model structure We already have "shapeModifiers" we can have something "operationModifiers" and have a field "add" this adds custom operations to the existing operations. Can you please give a try for this approach
{
"operationModifiers": {
"PresignedDownload": {
"addNew": [
{
"name": "PresignedDownload",
"http": {
"method": "GET",
"requestUri": "/"
},
"input": "PresignedDownloadInput"
},
"output": {
"shape": "GetObjectOutput"
},
"errors": [
{
"shape": "InvalidObjectState"
}
],
"documentation": "Non-modeled operation for downloading S3 object with pre-signed URL"
}
]
}
}
}
Define PresignedDownloadInput as mentioned in another comment