Class CachedCredentialsProvider.CachedCredentialsProviderBuilder
java.lang.Object
software.amazon.awssdk.crt.auth.credentials.CachedCredentialsProvider.CachedCredentialsProviderBuilder
- Enclosing class:
- CachedCredentialsProvider
A simple builder class for a cached credentials provider and its options
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a new caching credentials providerwithCachedProvider
(CredentialsProvider cachedProvider) Sets the credentials provider to cache results fromwithCachingDurationInSeconds
(int cachingDurationInSeconds) Sets the maximum caching duration for any credentials sourced through this provider.
-
Constructor Details
-
CachedCredentialsProviderBuilder
public CachedCredentialsProviderBuilder()Default constructor
-
-
Method Details
-
withCachingDurationInSeconds
public CachedCredentialsProvider.CachedCredentialsProviderBuilder withCachingDurationInSeconds(int cachingDurationInSeconds) Sets the maximum caching duration for any credentials sourced through this provider. Depending on the wrapped provider's configuration, credentials may be sourced with shorter durations.- Parameters:
cachingDurationInSeconds
- maximum caching duration in seconds of sourced credentials- Returns:
- the provider builder
-
withCachedProvider
public CachedCredentialsProvider.CachedCredentialsProviderBuilder withCachedProvider(CredentialsProvider cachedProvider) Sets the credentials provider to cache results from- Parameters:
cachedProvider
- credentials provider to cache results from- Returns:
- the provider builder
-
build
Builds a new caching credentials provider- Returns:
- the new credentials provider
-