Interface AwsClientBuilder<BuilderT extends AwsClientBuilder<BuilderT,ClientT>,ClientT>
-
- Type Parameters:
BuilderT
- The type of builder that should be returned by the fluent builder methods in this interface.ClientT
- The type of client generated by this builder.
- All Superinterfaces:
Buildable
,SdkBuilder<BuilderT,ClientT>
,SdkClientBuilder<BuilderT,ClientT>
- All Known Implementing Classes:
AwsDefaultClientBuilder
public interface AwsClientBuilder<BuilderT extends AwsClientBuilder<BuilderT,ClientT>,ClientT> extends SdkClientBuilder<BuilderT,ClientT>
This includes required and optional override configuration required by every client builder. An instance can be acquired by calling the static "builder" method on the type of client you wish to create.Implementations of this interface are mutable and not thread-safe.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default BuilderT
credentialsProvider(AwsCredentialsProvider credentialsProvider)
Configure the credentials that should be used to authenticate with AWS.default BuilderT
credentialsProvider(IdentityProvider<? extends AwsCredentialsIdentity> credentialsProvider)
Configure the credentials that should be used to authenticate with AWS.default BuilderT
defaultsMode(DefaultsMode defaultsMode)
Sets theDefaultsMode
that will be used to determine how certain default configuration options are resolved in the SDK.BuilderT
dualstackEnabled(Boolean dualstackEndpointEnabled)
Configure whether the SDK should use the AWS dualstack endpoint.BuilderT
fipsEnabled(Boolean fipsEndpointEnabled)
Configure whether the SDK should use the AWS fips endpoints.BuilderT
region(Region region)
Configure the region with which the SDK should communicate.-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.client.builder.SdkClientBuilder
addPlugin, endpointOverride, overrideConfiguration, overrideConfiguration, overrideConfiguration, plugins, putAuthScheme
-
-
-
-
Method Detail
-
credentialsProvider
default BuilderT credentialsProvider(AwsCredentialsProvider credentialsProvider)
Configure the credentials that should be used to authenticate with AWS.The default provider will attempt to identify the credentials automatically using the following checks:
- Java System Properties -
aws.accessKeyId
andaws.secretAccessKey
- Environment Variables -
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
- Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI
- Credentials delivered through the Amazon EC2 container service if AWS_CONTAINER_CREDENTIALS_RELATIVE_URI environment variable is set and security manager has permission to access the variable.
- Instance profile credentials delivered through the Amazon EC2 metadata service
If the credentials are not found in any of the locations above, an exception will be thrown at
SdkBuilder.build()
time.The last of
credentialsProvider(AwsCredentialsProvider)
orcredentialsProvider(IdentityProvider)
wins. - Java System Properties -
-
credentialsProvider
default BuilderT credentialsProvider(IdentityProvider<? extends AwsCredentialsIdentity> credentialsProvider)
Configure the credentials that should be used to authenticate with AWS.The default provider will attempt to identify the credentials automatically using the following checks:
- Java System Properties -
aws.accessKeyId
andaws.secretAccessKey
- Environment Variables -
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
- Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI
- Credentials delivered through the Amazon EC2 container service if AWS_CONTAINER_CREDENTIALS_RELATIVE_URI environment variable is set and security manager has permission to access the variable.
- Instance profile credentials delivered through the Amazon EC2 metadata service
If the credentials are not found in any of the locations above, an exception will be thrown at
SdkBuilder.build()
time.The last of
credentialsProvider(AwsCredentialsProvider)
orcredentialsProvider(IdentityProvider)
wins. - Java System Properties -
-
region
BuilderT region(Region region)
Configure the region with which the SDK should communicate.If this is not specified, the SDK will attempt to identify the endpoint automatically using the following logic:
- Check the 'aws.region' system property for the region.
- Check the 'AWS_REGION' environment variable for the region.
- Check the {user.home}/.aws/credentials and {user.home}/.aws/config files for the region.
- If running in EC2, check the EC2 metadata service for the region.
If the region is not found in any of the locations above, an exception will be thrown at
SdkBuilder.build()
time.
-
defaultsMode
default BuilderT defaultsMode(DefaultsMode defaultsMode)
Sets theDefaultsMode
that will be used to determine how certain default configuration options are resolved in the SDK.If this is not specified, the SDK will attempt to identify the defaults mode automatically using the following logic:
- Check the "defaults_mode" profile file property.
- Check "aws.defaultsMode" system property.
- Check the "AWS_DEFAULTS_MODE" environment variable.
- Parameters:
defaultsMode
- the defaultsMode to use- Returns:
- This object for method chaining.
- See Also:
DefaultsMode
-
dualstackEnabled
BuilderT dualstackEnabled(Boolean dualstackEndpointEnabled)
Configure whether the SDK should use the AWS dualstack endpoint.If this is not specified, the SDK will attempt to determine whether the dualstack endpoint should be used automatically using the following logic:
- Check the 'aws.useDualstackEndpoint' system property for 'true' or 'false'.
- Check the 'AWS_USE_DUALSTACK_ENDPOINT' environment variable for 'true' or 'false'.
- Check the {user.home}/.aws/credentials and {user.home}/.aws/config files for the 'use_dualstack_endpoint' property set to 'true' or 'false'.
If the setting is not found in any of the locations above, 'false' will be used.
-
fipsEnabled
BuilderT fipsEnabled(Boolean fipsEndpointEnabled)
Configure whether the SDK should use the AWS fips endpoints.If this is not specified, the SDK will attempt to determine whether the fips endpoint should be used automatically using the following logic:
- Check the 'aws.useFipsEndpoint' system property for 'true' or 'false'.
- Check the 'AWS_USE_FIPS_ENDPOINT' environment variable for 'true' or 'false'.
- Check the {user.home}/.aws/credentials and {user.home}/.aws/config files for the 'use_fips_endpoint' property set to 'true' or 'false'.
If the setting is not found in any of the locations above, 'false' will be used.
-
-