@InterfaceAudience.Public @InterfaceStability.Evolving public class AssumedRoleCredentialProvider extends Object implements com.amazonaws.auth.AWSCredentialsProvider, Closeable
STSAssumeRoleSessionCredentialsProvider from configuration
properties, including wiring up the inner authenticator, and,
unless overridden, creating a session name from the current user.
Classname is used in configuration files; do not move.| Modifier and Type | Field and Description |
|---|---|
static String |
E_NO_ROLE |
static String |
NAME |
| Constructor and Description |
|---|
AssumedRoleCredentialProvider(URI fsUri,
org.apache.hadoop.conf.Configuration conf)
Instantiate.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Propagate the close() call to the inner stsProvider.
|
com.amazonaws.auth.AWSCredentials |
getCredentials()
Get credentials.
|
void |
operationRetried(String text,
Exception ex,
int retries,
boolean idempotent)
Callback from
Invoker when an operation is retried. |
void |
refresh() |
String |
toString() |
public static final String NAME
public static final String E_NO_ROLE
public AssumedRoleCredentialProvider(URI fsUri, org.apache.hadoop.conf.Configuration conf) throws IOException
getCredentials() to fail fast on the inner
role credential retrieval.fsUri - URI of the filesystem.conf - configurationIOException - on IO problems and some parameter checkingIllegalArgumentException - invalid parameterscom.amazonaws.services.securitytoken.model.AWSSecurityTokenServiceException - problems getting credentialspublic com.amazonaws.auth.AWSCredentials getCredentials()
getCredentials in interface com.amazonaws.auth.AWSCredentialsProvidercom.amazonaws.services.securitytoken.model.AWSSecurityTokenServiceException - if none could be obtained.public void refresh()
refresh in interface com.amazonaws.auth.AWSCredentialsProviderpublic void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2008–2021 Apache Software Foundation. All rights reserved.