Class StsCredentialsProvider.BaseBuilder<B extends StsCredentialsProvider.BaseBuilder<B,​T>,​T extends ToCopyableBuilder<B,​T>>

    • Method Detail

      • stsClient

        public B stsClient​(StsClient stsClient)
        Configure the StsClient to use when calling STS to update the session. This client should not be shut down as long as this credentials provider is in use.
        Parameters:
        stsClient - The STS client to use for communication with STS.
        Returns:
        This object for chained calls.
      • asyncCredentialUpdateEnabled

        public B asyncCredentialUpdateEnabled​(Boolean 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 additional resources are used to maintain the provider.

        By default, this is disabled.

      • staleTime

        public B staleTime​(Duration staleTime)
        Configure the amount of time, relative to STS token expiration, that the cached credentials are considered stale and must be updated. All threads will block until the value is updated.

        By default, this is 1 minute.

      • prefetchTime

        public B prefetchTime​(Duration prefetchTime)
        Configure the amount of time, relative to STS 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. See asyncCredentialUpdateEnabled.

        By default, this is 5 minutes.