Class SsoCredentialsProvider.BuilderImpl
- java.lang.Object
-
- software.amazon.awssdk.services.sso.auth.SsoCredentialsProvider.BuilderImpl
-
- All Implemented Interfaces:
SsoCredentialsProvider.Builder,Buildable,CopyableBuilder<SsoCredentialsProvider.Builder,SsoCredentialsProvider>,SdkBuilder<SsoCredentialsProvider.Builder,SsoCredentialsProvider>
- Enclosing class:
- SsoCredentialsProvider
protected static final class SsoCredentialsProvider.BuilderImpl extends Object implements SsoCredentialsProvider.Builder
-
-
Constructor Summary
Constructors Constructor Description BuilderImpl(SsoCredentialsProvider provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SsoCredentialsProvider.BuilderasyncCredentialUpdateEnabled(Boolean asyncCredentialUpdateEnabled)Configure whether the provider should fetch credentials asynchronously in the background.SsoCredentialsProviderbuild()Create aSsoCredentialsProviderusing the configuration applied to this builder.SsoCredentialsProvider.BuilderprefetchTime(Duration prefetchTime)Configure the amount of time, relative to SSO session token expiration, that the cached credentials are considered close to stale and should be updated.SsoCredentialsProvider.BuilderrefreshRequest(Supplier<GetRoleCredentialsRequest> getRoleCredentialsRequestSupplier)Similar toSsoCredentialsProvider.Builder.refreshRequest(GetRoleCredentialsRequest), but takes aSupplierto supply the request to SSO.SsoCredentialsProvider.BuilderrefreshRequest(GetRoleCredentialsRequest getRoleCredentialsRequest)Configure theGetRoleCredentialsRequestthat should be periodically sent to the SSO service to update the credentials.SsoCredentialsProvider.BuilderssoClient(SsoClient ssoClient)Configure theSsoClientto use when calling SSO to update the session.SsoCredentialsProvider.BuilderstaleTime(Duration staleTime)Configure the amount of time, relative to SSO session token expiration, that the cached credentials are considered stale and should no longer be used.-
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
-
-
-
-
Constructor Detail
-
BuilderImpl
public BuilderImpl(SsoCredentialsProvider provider)
-
-
Method Detail
-
ssoClient
public SsoCredentialsProvider.Builder ssoClient(SsoClient ssoClient)
Description copied from interface:SsoCredentialsProvider.BuilderConfigure theSsoClientto use when calling SSO to update the session. This client should not be shut down as long as this credentials provider is in use.- Specified by:
ssoClientin interfaceSsoCredentialsProvider.Builder
-
asyncCredentialUpdateEnabled
public SsoCredentialsProvider.Builder asyncCredentialUpdateEnabled(Boolean asyncCredentialUpdateEnabled)
Description copied from interface:SsoCredentialsProvider.BuilderConfigure 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 addtiional resources are used to maintian the provider.By default, this is disabled.
- Specified by:
asyncCredentialUpdateEnabledin interfaceSsoCredentialsProvider.Builder
-
staleTime
public SsoCredentialsProvider.Builder staleTime(Duration staleTime)
Description copied from interface:SsoCredentialsProvider.BuilderConfigure the amount of time, relative to SSO session token expiration, that the cached credentials are considered stale and should no longer be used. All threads will block until the value is updated.By default, this is 1 minute.
- Specified by:
staleTimein interfaceSsoCredentialsProvider.Builder
-
prefetchTime
public SsoCredentialsProvider.Builder prefetchTime(Duration prefetchTime)
Description copied from interface:SsoCredentialsProvider.BuilderConfigure the amount of time, relative to SSO session 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. SeeSsoCredentialsProvider.Builder.asyncCredentialUpdateEnabled(java.lang.Boolean).By default, this is 5 minutes.
- Specified by:
prefetchTimein interfaceSsoCredentialsProvider.Builder
-
refreshRequest
public SsoCredentialsProvider.Builder refreshRequest(GetRoleCredentialsRequest getRoleCredentialsRequest)
Description copied from interface:SsoCredentialsProvider.BuilderConfigure theGetRoleCredentialsRequestthat should be periodically sent to the SSO service to update the credentials.- Specified by:
refreshRequestin interfaceSsoCredentialsProvider.Builder
-
refreshRequest
public SsoCredentialsProvider.Builder refreshRequest(Supplier<GetRoleCredentialsRequest> getRoleCredentialsRequestSupplier)
Description copied from interface:SsoCredentialsProvider.BuilderSimilar toSsoCredentialsProvider.Builder.refreshRequest(GetRoleCredentialsRequest), but takes aSupplierto supply the request to SSO.- Specified by:
refreshRequestin interfaceSsoCredentialsProvider.Builder
-
build
public SsoCredentialsProvider build()
Description copied from interface:SsoCredentialsProvider.BuilderCreate aSsoCredentialsProviderusing the configuration applied to this builder.- Specified by:
buildin interfaceBuildable- Specified by:
buildin interfaceSdkBuilder<SsoCredentialsProvider.Builder,SsoCredentialsProvider>- Specified by:
buildin interfaceSsoCredentialsProvider.Builder
-
-