@ThreadSafe public abstract class StsCredentialsProvider extends Object implements AwsCredentialsProvider, SdkAutoCloseable
AwsCredentialsProvider
that is extended within this package to provide support for periodically-
updating session credentials.
When credentials get close to expiration, this class will attempt to update them automatically either with a single calling
thread (by default) or asynchronously (if asyncCredentialUpdateEnabled
is true). If the credentials expire, this
class will block all calls to resolveCredentials()
until the credentials are updated.
Users of this provider must close()
it when they are finished using it.Modifier and Type | Class and Description |
---|---|
static class |
StsCredentialsProvider.BaseBuilder<B extends StsCredentialsProvider.BaseBuilder<B,T>,T extends ToCopyableBuilder<B,T>>
Extended by child class's builders to share configuration across credential providers.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
Duration |
prefetchTime()
The amount of time, relative to STS token expiration, that the cached credentials are considered close to stale
and should be updated.
|
AwsCredentials |
resolveCredentials() |
Duration |
staleTime()
The amount of time, relative to STS token expiration, that the cached credentials are considered stale and
should no longer be used.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
identityType, resolveIdentity
resolveIdentity, resolveIdentity
public AwsCredentials resolveCredentials()
resolveCredentials
in interface AwsCredentialsProvider
public void close()
close
in interface AutoCloseable
close
in interface SdkAutoCloseable
public Duration staleTime()
public Duration prefetchTime()
Copyright © 2023. All rights reserved.