@InterfaceAudience.Public @InterfaceStability.Evolving public class IAMInstanceCredentialsProvider extends Object implements com.amazonaws.auth.AWSCredentialsProvider, Closeable
EC2ContainerCredentialsProviderWrapper
to provide credentials when the S3A connector is instantiated on AWS EC2
or the AWS container services.
When it fails to authenticate, it raises a
NoAwsCredentialsException 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() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
com.amazonaws.auth.AWSCredentials |
getCredentials()
Ask for the credentials.
|
void |
refresh() |
public com.amazonaws.auth.AWSCredentials getCredentials()
getCredentials in interface com.amazonaws.auth.AWSCredentialsProviderNoAwsCredentialsException - on auth failure to indicate non-recoverable.public void refresh()
refresh in interface com.amazonaws.auth.AWSCredentialsProviderpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2008–2022 Apache Software Foundation. All rights reserved.