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 theDefaultCredentialsProvider
's behavior.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultCredentialsProvider.Builder
asyncCredentialUpdateEnabled(Boolean asyncCredentialUpdateEnabled)
Configure whether this provider should fetch credentials asynchronously in the background.DefaultCredentialsProvider
build()
Create aDefaultCredentialsProvider
using the configuration defined in this builder.DefaultCredentialsProvider.Builder
profileFile(Supplier<ProfileFile> profileFileSupplier)
DefaultCredentialsProvider.Builder
profileFile(ProfileFile profileFile)
DefaultCredentialsProvider.Builder
profileName(String profileName)
DefaultCredentialsProvider.Builder
reuseLastProviderEnabled(Boolean reuseLastProviderEnabled)
Controls whether the provider should reuse the last successful credentials provider in the chain.-
Methods inherited from class java.lang.Object
clone, equals, finalize, 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 Detail
-
profileFile
public DefaultCredentialsProvider.Builder profileFile(ProfileFile profileFile)
-
profileFile
public DefaultCredentialsProvider.Builder profileFile(Supplier<ProfileFile> profileFileSupplier)
-
profileName
public DefaultCredentialsProvider.Builder profileName(String 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
public DefaultCredentialsProvider build()
Create aDefaultCredentialsProvider
using the configuration defined in this builder.- Specified by:
build
in interfaceBuildable
- Specified by:
build
in interfaceSdkBuilder<DefaultCredentialsProvider.Builder,DefaultCredentialsProvider>
-
-