-
Notifications
You must be signed in to change notification settings - Fork 836
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for service-specific endpoint overrides without code chan…
…ges. (#5562) * Made protected API changes in support of service-specific endpoint overrides. Class-Level Changes: * DefaultServiceEndpointBuilder - Deprecated in favor of the new ClientEndpointProvider and AwsClientEndpointProvider * ClientEndpointProvider - An interface for resolving the client-level endpoint. This endpoint may be overridden by the request-level EndpointProvider. This joins the existing fleet of endpoint-related providers, like region providers, dualstack providers, and FIPS providers. * AwsClientEndpointProvider - An implementation of ClientEndpointProvider that checks the client configuration, environment and service metadata to determine the client endpoint. Field Changes: * Deprecated SdkClientOption.ENDPOINT and SdkClientOption.ENDPOINT_OVERRIDDEN in favor of a new SdkClientOption.CLIENT_ENDPOINT_PROVIDER. The new property allows updating both values in a single field. It was a necessary improvement so that these properties can stay in sync, reliably. * Deprecated SdkExecutionAttribute.CLIENT_ENDPOINT and SdkClientOption.ENDPOINT_OVERRIDDEN in favor of a new SdkInternalExecutionAttribute.CLIENT_ENDPOINT_PROVIDER. The new property exists for much the same reasons as the new SdkClientOption, but also provides an opportunity to hide these should-be-internal-to-the-SDK attributes. * Updates to the way SDK clients are built, to support the new client endpoint providers. 1. Make clients set the SdkClientOption.CLIENT_ENDPOINT_PROVIDER when they are created. 2. Update the default AWS and SDK client builders to default the SdkClientOption.CLIENT_ENDPOINT_PROVIDERs so that old clients continue to work with the new core. Old clients versions won't support setting the endpoint with the new environment variable/system property/profile settings. This commit also includes EndpointSharedConfigTest which tests to make sure that the new ways of overriding the endpoint work for clients. * Moved non-client users of DefaultServiceEndpointBuilder over to AwsClientEndpointProvider. These are the users that remain after the last commit: 1. RdsPresignInterceptors in RDS, Neptune and DocDB. It's unfortunate that these are pretty much copy+pasted classes, but that seems like a future problem to figure out. 2. S3Utilities 3. S3Presigner 4. PollyPresigner * Miscellaneous changes required to move the SDK over from the old SdkClientOptions and SdkExecutionAttributes to the new SdkClientOptions and SdkInternalExecutionAttribute. * Codegen test file changes. * Changelog entry. * Fix checkstyle issue. * Update .changes/next-release/feature-AWSSDKforJavav2-eea40a4.json Co-authored-by: David Ho <[email protected]> * WIP * Updated environment variables and profile properties to match the other AWS SDKs. * Addressed comments. * Updated test to use new profile property and environment variables. --------- Co-authored-by: David Ho <[email protected]>
- Loading branch information
Showing
70 changed files
with
2,363 additions
and
640 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"type": "feature", | ||
"category": "AWS SDK for Java v2", | ||
"contributor": "", | ||
"description": "Add support for specifying endpoint overrides using environment variables, system properties or profile files. More information about this feature is available here: https://docs.aws.amazon.com/sdkref/latest/guide/feature-ss-endpoints.html" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.