diff --git a/aws/config.go b/aws/config.go index 471fbe25b4e..2b346baee77 100644 --- a/aws/config.go +++ b/aws/config.go @@ -39,13 +39,20 @@ type Config struct { HTTPClient HTTPClient // An endpoint resolver that can be used to provide or override an endpoint for the given - // service and region Please see the `aws.EndpointResolver` documentation on usage. + // service and region. + // + // See the `aws.EndpointResolver` documentation for additional usage information. // // Deprecated: See Config.EndpointResolverWithOptions EndpointResolver EndpointResolver // An endpoint resolver that can be used to provide or override an endpoint for the given - // service and region Please see the `aws.EndpointResolverWithOptions` documentation on usage. + // service and region. + // + // When EndpointResolverWithOptions is specified, it will be used by a service client rather than using + // EndpointResolver if also specified. + // + // See the `aws.EndpointResolverWithOptions` documentation for additional usage information. EndpointResolverWithOptions EndpointResolverWithOptions // Retryer is a function that provides a Retryer implementation. A Retryer guides how HTTP requests should be diff --git a/aws/endpoints.go b/aws/endpoints.go index 706f13d2f1d..aa10a9b40f0 100644 --- a/aws/endpoints.go +++ b/aws/endpoints.go @@ -160,22 +160,28 @@ func (e *EndpointNotFoundError) Unwrap() error { // available. If the EndpointResolver returns an EndpointNotFoundError error, // API clients will fallback to attempting to resolve the endpoint using its // internal default endpoint resolver. +// +// Deprecated: See EndpointResolverWithOptions type EndpointResolver interface { ResolveEndpoint(service, region string) (Endpoint, error) } // EndpointResolverFunc wraps a function to satisfy the EndpointResolver interface. +// +// Deprecated: See EndpointResolverWithOptionsFunc type EndpointResolverFunc func(service, region string) (Endpoint, error) // ResolveEndpoint calls the wrapped function and returns the results. +// +// Deprecated: See EndpointResolverWithOptions.ResolveEndpoint func (e EndpointResolverFunc) ResolveEndpoint(service, region string) (Endpoint, error) { return e(service, region) } // EndpointResolverWithOptions is an endpoint resolver that can be used to provide or -// override an endpoint for the given service, region, and the service clients EndpointOptions. API clients will -// attempt to use the EndpointResolver first to resolve an endpoint if -// available. If the EndpointResolver returns an EndpointNotFoundError error, +// override an endpoint for the given service, region, and the service client's EndpointOptions. API clients will +// attempt to use the EndpointResolverWithOptions first to resolve an endpoint if +// available. If the EndpointResolverWithOptions returns an EndpointNotFoundError error, // API clients will fallback to attempting to resolve the endpoint using its // internal default endpoint resolver. type EndpointResolverWithOptions interface {