Class CachedCredentialsProvider.CachedCredentialsProviderBuilder
- java.lang.Object
-
- software.amazon.awssdk.crt.auth.credentials.CachedCredentialsProvider.CachedCredentialsProviderBuilder
-
- Enclosing class:
- CachedCredentialsProvider
public static class CachedCredentialsProvider.CachedCredentialsProviderBuilder extends Object
A simple builder class for a cached credentials provider and its options
-
-
Constructor Summary
Constructors Constructor Description CachedCredentialsProviderBuilder()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CachedCredentialsProviderbuild()Builds a new caching credentials providerCachedCredentialsProvider.CachedCredentialsProviderBuilderwithCachedProvider(CredentialsProvider cachedProvider)Sets the credentials provider to cache results fromCachedCredentialsProvider.CachedCredentialsProviderBuilderwithCachingDurationInSeconds(int cachingDurationInSeconds)Sets the maximum caching duration for any credentials sourced through this provider.
-
-
-
Method Detail
-
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
public CachedCredentialsProvider build()
Builds a new caching credentials provider- Returns:
- the new credentials provider
-
-