Interface SsoCredentialsProvider.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<SsoCredentialsProvider.Builder,
,SsoCredentialsProvider> SdkBuilder<SsoCredentialsProvider.Builder,
SsoCredentialsProvider>
- Enclosing class:
SsoCredentialsProvider
public static interface SsoCredentialsProvider.Builder
extends CopyableBuilder<SsoCredentialsProvider.Builder,SsoCredentialsProvider>
A builder for creating a custom
SsoCredentialsProvider
.-
Method Summary
Modifier and TypeMethodDescriptionasyncCredentialUpdateEnabled
(Boolean asyncCredentialUpdateEnabled) Configure whether the provider should fetch credentials asynchronously in the background.build()
Create aSsoCredentialsProvider
using the configuration applied to this builder.prefetchTime
(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.refreshRequest
(Supplier<GetRoleCredentialsRequest> getRoleCredentialsRequestSupplier) Similar torefreshRequest(GetRoleCredentialsRequest)
, but takes aSupplier
to supply the request to SSO.refreshRequest
(GetRoleCredentialsRequest getRoleCredentialsRequest) Configure theGetRoleCredentialsRequest
that should be periodically sent to the SSO service to update the credentials.Configure theSsoClient
to use when calling SSO to update the session.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 interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation
-
Method Details
-
ssoClient
Configure theSsoClient
to use when calling SSO to update the session. This client should not be shut down as long as this credentials provider is in use. -
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 addtiional resources are used to maintian the provider.By default, this is disabled.
-
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. All threads will block until the value is updated.By default, this is 1 minute.
-
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. Prefetch updates will occur between the specified time and the stale time of the provider. Prefetch updates may be asynchronous. SeeasyncCredentialUpdateEnabled(java.lang.Boolean)
.By default, this is 5 minutes.
-
refreshRequest
Configure theGetRoleCredentialsRequest
that should be periodically sent to the SSO service to update the credentials. -
refreshRequest
SsoCredentialsProvider.Builder refreshRequest(Supplier<GetRoleCredentialsRequest> getRoleCredentialsRequestSupplier) Similar torefreshRequest(GetRoleCredentialsRequest)
, but takes aSupplier
to supply the request to SSO. -
build
SsoCredentialsProvider build()Create aSsoCredentialsProvider
using the configuration applied to this builder.- Specified by:
build
in interfaceBuildable
- Specified by:
build
in interfaceSdkBuilder<SsoCredentialsProvider.Builder,
SsoCredentialsProvider> - Returns:
-