public static final class STSClientFactory.STSClient extends Object implements Closeable
Modifier and Type | Method and Description |
---|---|
void |
close() |
com.amazonaws.services.securitytoken.model.Credentials |
requestRole(String roleARN,
String sessionName,
String policy,
long duration,
TimeUnit timeUnit)
Request a set of role credentials.
|
com.amazonaws.services.securitytoken.model.Credentials |
requestSessionCredentials(long duration,
TimeUnit timeUnit)
Request a set of session credentials.
|
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
@Retries.RetryTranslated public com.amazonaws.services.securitytoken.model.Credentials requestSessionCredentials(long duration, TimeUnit timeUnit) throws IOException
duration
- duration of the credentialstimeUnit
- time unit of durationIOException
- on a failure of the request@Retries.RetryTranslated public com.amazonaws.services.securitytoken.model.Credentials requestRole(String roleARN, String sessionName, String policy, long duration, TimeUnit timeUnit) throws IOException
roleARN
- ARN to requestsessionName
- name of the sessionpolicy
- optional policy; "" is treated as "none"duration
- duration of the credentialstimeUnit
- time unit of durationIOException
- on a failure of the requestCopyright © 2008–2020 Apache Software Foundation. All rights reserved.