diff --git a/aws/endpoints.go b/aws/endpoints.go index fdea51add19..eb26eceb4f5 100644 --- a/aws/endpoints.go +++ b/aws/endpoints.go @@ -54,8 +54,27 @@ type Endpoint struct { // The signing method that should be used for signing the requests to the // endpoint. SigningMethod string + + // The source of the Endpoint. By default, this will be ServiceMetadata. + // When providing a custom endpoint, you should set the source as CustomSource. + // If source is not provided when providing a custom endpoint, the SDK may not + // perform required host mutations correctly. Source should be used along with + // HostnameImmutable property as per the usage requirement. + Source EndpointSource } +// EndpointSource is the source type of endpoint. +type EndpointSource int + +const ( + // ServiceMetadata denotes service provided endpoint metadata used as Endpoint Source. + ServiceMetadata EndpointSource = iota + + // CustomSource denotes endpoint is a custom endpoint. + // This source should be used when providing a custom endpoint to be used by the SDK. + CustomSource +) + // EndpointNotFoundError is a sentinel error to indicate that the // EndpointResolver implementation was unable to resolve an endpoint for the // given service and region. Resolvers should use this to indicate that an API