Class DefaultCredentialsProvider.Builder
java.lang.Object
software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider.Builder
- All Implemented Interfaces:
Buildable
,CopyableBuilder<DefaultCredentialsProvider.Builder,
,DefaultCredentialsProvider> SdkBuilder<DefaultCredentialsProvider.Builder,
DefaultCredentialsProvider>
- Enclosing class:
DefaultCredentialsProvider
public static final class DefaultCredentialsProvider.Builder
extends Object
implements CopyableBuilder<DefaultCredentialsProvider.Builder,DefaultCredentialsProvider>
Configuration that defines the
DefaultCredentialsProvider
's behavior.-
Method Summary
Modifier and TypeMethodDescriptionasyncCredentialUpdateEnabled
(Boolean asyncCredentialUpdateEnabled) Configure whether this provider should fetch credentials asynchronously in the background.build()
Create aDefaultCredentialsProvider
using the configuration defined in this builder.profileFile
(Supplier<ProfileFile> profileFileSupplier) profileFile
(ProfileFile profileFile) profileName
(String profileName) reuseLastProviderEnabled
(Boolean reuseLastProviderEnabled) Controls whether the provider should reuse the last successful credentials provider in the chain.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation
-
Method Details
-
profileFile
-
profileFile
-
profileName
-
reuseLastProviderEnabled
public DefaultCredentialsProvider.Builder reuseLastProviderEnabled(Boolean reuseLastProviderEnabled) Controls whether the provider should reuse the last successful credentials provider in the chain. Reusing the last successful credentials provider will typically return credentials faster than searching through the chain.By default, this is enabled.
-
asyncCredentialUpdateEnabled
public DefaultCredentialsProvider.Builder asyncCredentialUpdateEnabled(Boolean asyncCredentialUpdateEnabled) Configure whether this provider should fetch credentials asynchronously in the background. If this is true, threads are less likely to block whenDefaultCredentialsProvider.resolveCredentials()
is called, but additional resources are used to maintain the provider.By default, this is disabled.
-
build
Create aDefaultCredentialsProvider
using the configuration defined in this builder.- Specified by:
build
in interfaceBuildable
- Specified by:
build
in interfaceSdkBuilder<DefaultCredentialsProvider.Builder,
DefaultCredentialsProvider> - Returns:
- an instance of T
-