Class StsCredentialsProvider.BaseBuilder<B extends StsCredentialsProvider.BaseBuilder<B,T>,T extends ToCopyableBuilder<B,T>>
java.lang.Object
software.amazon.awssdk.services.sts.auth.StsCredentialsProvider.BaseBuilder<B,T>
- All Implemented Interfaces:
Buildable
,CopyableBuilder<B,
,T> SdkBuilder<B,
T>
- Direct Known Subclasses:
StsAssumeRoleCredentialsProvider.Builder
,StsAssumeRoleWithSamlCredentialsProvider.Builder
,StsAssumeRoleWithWebIdentityCredentialsProvider.Builder
,StsGetFederationTokenCredentialsProvider.Builder
,StsGetSessionTokenCredentialsProvider.Builder
,StsWebIdentityTokenFileCredentialsProvider.Builder
- Enclosing class:
StsCredentialsProvider
@NotThreadSafe
public abstract static class StsCredentialsProvider.BaseBuilder<B extends StsCredentialsProvider.BaseBuilder<B,T>,T extends ToCopyableBuilder<B,T>>
extends Object
implements CopyableBuilder<B,T>
Extended by child class's builders to share configuration across credential providers.
-
Method Summary
Modifier and TypeMethodDescriptionasyncCredentialUpdateEnabled
(Boolean asyncCredentialUpdateEnabled) Configure whether the provider should fetch credentials asynchronously in the background.build()
Build the credentials provider using the configuration applied to this builder.prefetchTime
(Duration prefetchTime) Configure the amount of time, relative to STS token expiration, that the cached credentials are considered close to stale and should be updated.Configure the amount of time, relative to STS token expiration, that the cached credentials are considered stale and must be updated.Configure theStsClient
to use when calling STS to update the session.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
-
stsClient
Configure theStsClient
to use when calling STS to update the session. This client should not be shut down as long as this credentials provider is in use.- Parameters:
stsClient
- The STS client to use for communication with STS.- Returns:
- This object for chained calls.
-
asyncCredentialUpdateEnabled
Configure whether the provider should fetch credentials asynchronously in the background. If this is true, threads are less likely to block when credentials are loaded, but additional resources are used to maintain the provider.By default, this is disabled.
-
staleTime
Configure the amount of time, relative to STS token expiration, that the cached credentials are considered stale and must be updated. All threads will block until the value is updated.By default, this is 1 minute.
-
prefetchTime
Configure the amount of time, relative to STS token expiration, that the cached credentials are considered close to stale and should be updated. Prefetch updates will occur between the specified time and the stale time of the provider. Prefetch updates may be asynchronous. SeeasyncCredentialUpdateEnabled
.By default, this is 5 minutes.
-
build
Build the credentials provider using the configuration applied to this builder.- Specified by:
build
in interfaceBuildable
- Specified by:
build
in interfaceSdkBuilder<B extends StsCredentialsProvider.BaseBuilder<B,
T>, T extends ToCopyableBuilder<B, T>> - Returns:
- an instance of T
-