CachedCredentialsProvider
Creates a provider that functions as a caching decorator of another provider.
Credentials sourced through this provider will be cached within it until their expiration time. When the cached credentials expire, new credentials will be fetched when next queried.
For example, the default chain is implemented as:
CachedProvider -> ProviderChain(EnvironmentProvider -> ProfileProvider -> ECS/EC2IMD etc...)
Return
the newly-constructed credentials provider
Parameters
the provider to cache credentials results from
the default expiration time period for sourced credentials. For a given set of cached credentials, the refresh time period will be the minimum of this time and any expiration timestamp on the credentials themselves.
amount of time before the actual credential expiration time when credentials are considered expired. For example, if credentials are expiring in 15 minutes, and the buffer time is 10 seconds, then any requests made after 14 minutes and 50 seconds will load new credentials. Defaults to 10 seconds.
the source of time for this provider
Constructors
Inherited properties
Retrieves the simple name of the class implementing CredentialsProvider.
Functions
Inherited functions
A utility function which wraps a CredentialsProvider in a CachedCredentialsProvider.