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 @SdkPublicApi 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BasyncCredentialUpdateEnabled(Boolean asyncCredentialUpdateEnabled)Configure whether the provider should fetch credentials asynchronously in the background.Tbuild()Build the credentials provider using the configuration applied to this builder.BprefetchTime(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.BstaleTime(Duration staleTime)Configure the amount of time, relative to STS token expiration, that the cached credentials are considered stale and must be updated.BstsClient(StsClient stsClient)Configure theStsClientto use when calling STS to update the session.-
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
-
stsClient
public B stsClient(StsClient stsClient)
Configure theStsClientto 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
public B asyncCredentialUpdateEnabled(Boolean 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
public B staleTime(Duration 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
public B 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. 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
public T build()
Build the credentials provider using the configuration applied to this builder.- Specified by:
buildin interfaceBuildable- Specified by:
buildin interfaceSdkBuilder<B extends StsCredentialsProvider.BaseBuilder<B,T>,T extends ToCopyableBuilder<B,T>>
-
-