@InterfaceAudience.Public @InterfaceStability.Evolving public class IAMInstanceCredentialsProvider extends Object implements software.amazon.awssdk.auth.credentials.AwsCredentialsProvider, Closeable
ContainerCredentialsProvider
to provide credentials when the S3A connector is instantiated on AWS EC2
or the AWS container services.
The provider is initialized with async credential refresh enabled to be less brittle against transient network issues.
If the ContainerCredentialsProvider fails to authenticate, then an instance of
InstanceProfileCredentialsProvider is created and attemped to
be used instead, again with async credential refresh enabled.
If both credential providers fail, a NoAwsCredentialsException
is thrown, which can be recognized by retry handlers
as a non-recoverable failure.
It is implicitly public; marked evolving as we can change its semantics.
| Constructor and Description |
|---|
IAMInstanceCredentialsProvider()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
isContainerCredentialsProvider()
Is this a container credentials provider?
|
software.amazon.awssdk.auth.credentials.AwsCredentials |
resolveCredentials()
Ask for the credentials.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic IAMInstanceCredentialsProvider()
isContainerCredentialsProvider as true.public software.amazon.awssdk.auth.credentials.AwsCredentials resolveCredentials()
resolveCredentials in interface software.amazon.awssdk.auth.credentials.AwsCredentialsProviderNoAwsCredentialsException - on auth failure to indicate non-recoverable.public boolean isContainerCredentialsProvider()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2008–2024 Apache Software Foundation. All rights reserved.