Skip to content

Commit ed65288

Browse files
committed
remove incorrect mentions of endpointUrl reordering being part of v1.5
1 parent f107908 commit ed65288

File tree

1 file changed

+1
-37
lines changed

1 file changed

+1
-37
lines changed

TEMP-BREAKING-Endpoint-Discovery-changes.md

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ Several aspects of Endpoint Discovery are changing:
2222
custom cache implementations
2323
* The current implementation of `ReadThroughCache` is now provided in the new `PeriodicSweepCache` class, which
2424
implements the new `ExpiringKeyedCache` interface
25-
* The `endpointUrl` configuration parameter now takes precedence over endpoint discoverers. If you've configured both a
26-
custom `endpointUrl` and the service client has Endpoint Discovery enabled, the custom `endpointUrl` will be used and
27-
Endpoint Discovery will effectively be disabled.
2825
* Endpoint Discovery settings will now be resolved from
2926
[environmental configuration](https://docs.aws.amazon.com/sdkref/latest/guide/feature-endpoint-discovery.html) sources
3027
used by other AWS SDKs, including the following sources:
@@ -75,39 +72,6 @@ val timestreamQuery = TimestreamQueryClient.fromEnvironment {
7572
}
7673
```
7774

78-
### Overriding endpoint discovery with `endpointUrl`
79-
80-
Previously, the `endpointUrl` configuration parameter was effectively ignored when Endpoint Discovery was in use. This
81-
made it difficult to use custom endpoints as might be desirable when using mock implementations, non-AWS services, etc.
82-
83-
After this update, the `endpointUrl` configuration parameter, if set, now takes precedence over any `endpointDiscoverer`
84-
set on the same client. The default discoverer _without_ a custom endpoint URL is recommended in most scenarios. If you
85-
wish to use a custom endpoint, you may do so by setting `endpointUrl`:
86-
87-
```kotlin
88-
TimestreamQueryClient.fromEnvironment {
89-
endpointUrl = Url.parse("http://localhost:2345")
90-
}
91-
```
92-
93-
In the above example, the **localhost** address specified in `endpointUrl` will _always_ be used and no additional calls
94-
will be made to support Endpoint Discovery. This behavior is implementation specific in the default discoverer. If you
95-
implement your own endpoint discoverer, you will need to handle situations where the `endpointUrl` is set:
96-
97-
```kotlin
98-
class MyCustomTimestreamQueryEndpointDiscoverer : TimestreamQueryEndpointDiscoverer {
99-
override fun asEndpointResolver(client: TimestreamQueryClient, delegate: EndpointResolver) = EndpointResolver {
100-
if (client.config.endpointUrl == null) {
101-
// No custom endpoint set, do normal Endpoint Discovery logic
102-
TODO("implementation omitted")
103-
} else {
104-
// Custom endpoint set, bypass Endpoint Discovery logic
105-
Endpoint(client.config.endpointUrl)
106-
}
107-
}
108-
}
109-
```
110-
11175
### Customizing Endpoint Discovery with environmental configuration
11276

11377
Previously, the settings for Endpoint Discovery were controlled through explicitly-set parameters in client
@@ -141,4 +105,4 @@ For more information about Endpoint Discovery, see the following resources:
141105

142106
If you have any questions concerning this change, please feel free to engage with us in this discussion. If you
143107
encounter a bug with this change, please
144-
[file an issue](https://github.com/awslabs/aws-sdk-kotlin/issues/new?template=bug_report.yml).
108+
[file an issue](https://github.com/awslabs/aws-sdk-kotlin/issues/new?template=bug_report.yml).

0 commit comments

Comments
 (0)