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 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

      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