Class AwsClientEndpointProvider.Builder

java.lang.Object
software.amazon.awssdk.awscore.endpoint.AwsClientEndpointProvider.Builder
Enclosing class:
AwsClientEndpointProvider

public static final class AwsClientEndpointProvider.Builder extends Object
  • Method Details

    • clientEndpointOverride

      public AwsClientEndpointProvider.Builder clientEndpointOverride(URI clientEndpointOverride)
      Set the endpoint that was overridden by the customer using SdkClientBuilder.endpointOverride(URI).

      If specified, this provider will behave the same as ClientEndpointProvider.forEndpointOverride(URI). Other configured values will not be used.

    • serviceEndpointOverrideEnvironmentVariable

      public AwsClientEndpointProvider.Builder serviceEndpointOverrideEnvironmentVariable(String serviceEndpointOverrideEnvironmentVariable)
      Set the service-specific environment variable that should be used to load the endpoint override for this service.

      If this value is set, serviceEndpointOverrideSystemProperty and serviceProfileProperty must also be set.

      If this value is not set, loading the service endpoint from the environment is skipped.

    • serviceEndpointOverrideSystemProperty

      public AwsClientEndpointProvider.Builder serviceEndpointOverrideSystemProperty(String serviceEndpointOverrideSystemProperty)
      Set the service-specific system property that should be used to load the endpoint override for this service.

      If this value is set, serviceEndpointOverrideEnvironmentVariable and serviceProfileProperty must also be set.

      If this value is not set, loading the service endpoint from the environment is skipped.

    • serviceProfileProperty

      public AwsClientEndpointProvider.Builder serviceProfileProperty(String serviceProfileProperty)
      Set the service-specific profile property that should be used to load the endpoint override for this service.

      If this value is set, serviceEndpointOverrideEnvironmentVariable and serviceEndpointOverrideSystemProperty must also be set.

      If this value is not set, loading the service endpoint from the environment is skipped.

    • profileFile

      public AwsClientEndpointProvider.Builder profileFile(Supplier<ProfileFile> profileFile)
      Set the profile file supplier that will supply the customer's profile file. This profile file is used both for checking for the endpoint override and when resolving the endpoint from ServiceMetadata.

      If this value is not set, the ProfileFile.defaultProfileFile() is used.

    • profileName

      public AwsClientEndpointProvider.Builder profileName(String profileName)
      Set the profile name for the profile that should be used . This profile is used both for checking for the endpoint override and when resolving the endpoint from ServiceMetadata.

      If this value is not set, ProfileFileSystemSetting.AWS_PROFILE is used.

    • serviceEndpointPrefix

      public AwsClientEndpointProvider.Builder serviceEndpointPrefix(String serviceEndpointPrefix)
      Set the service endpoint prefix, as it is expected by ServiceMetadata.of(String).

      This value will only be used if the endpoint is loaded from service metadata.

      If this value is set, defaultProtocol(java.lang.String) and region must also be set. If this value is not set, loading the service endpoint from service metadata is skipped.

    • defaultProtocol

      public AwsClientEndpointProvider.Builder defaultProtocol(String protocol)
      Set the protocol to be used for endpoints returned by ServiceMetadata.of(String).

      This value will only be used if the endpoint is loaded from service metadata.

      If this value is set, serviceEndpointPrefix and region must also be set. If this value is not set, loading the service endpoint from service metadata is skipped.

    • region

      public AwsClientEndpointProvider.Builder region(Region region)
      The region to use when resolving with ServiceMetadata.of(String).

      This value will only be used if the region is loaded from service metadata.

      If this value is set, serviceEndpointPrefix and defaultProtocol(java.lang.String) must also be set. If this value is not set, loading the service endpoint from service metadata is skipped.

    • dualstackEnabled

      public AwsClientEndpointProvider.Builder dualstackEnabled(Boolean dualstackEnabled)
      Whether dualstack endpoints should be used when resolving with ServiceMetadata.of(String).

      This value will only be used if the endpoint is loaded from service metadata.

      If this value is not set, the DualstackEnabledProvider will be used.

    • fipsEnabled

      public AwsClientEndpointProvider.Builder fipsEnabled(Boolean fipsEnabled)
      Whether FIPS endpoints should be used when resolving with ServiceMetadata.of(String).

      This value will only be used if the endpoint is loaded from service metadata.

      If this value is not set, the FipsEnabledProvider will be used.

    • putAdvancedOption

      public <T> AwsClientEndpointProvider.Builder putAdvancedOption(ServiceMetadataAdvancedOption<T> option, T value)
      Specify advanced options that should be passed on to the ServiceMetadata.

      This value will only be used if the endpoint is loaded from service metadata.

    • build

      Deprecated.
      This method triggers expensive ServiceMetadata initialization and is no longer used by the SDK. Service endpoint resolution is handled by Endpoints 2.0 at request time.
    • resolveFromOverrides

      public Optional<URI> resolveFromOverrides()
      Resolve an endpoint from overrides and environment configuration. Checks client override, system properties, environment variables, and profile configuration. Returns Optional.empty() if no override is configured, allowing callers to provide their own fallback.