Package org.apache.hadoop.fs.s3a.auth
Class STSClientFactory.STSClient
java.lang.Object
org.apache.hadoop.fs.s3a.auth.STSClientFactory.STSClient
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
- STSClientFactory
STS client connection with retries.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()software.amazon.awssdk.services.sts.model.CredentialsrequestRole(String roleARN, String sessionName, String policy, long duration, TimeUnit timeUnit) Request a set of role credentials.software.amazon.awssdk.services.sts.model.CredentialsrequestSessionCredentials(long duration, TimeUnit timeUnit) Request a set of session credentials.
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
requestSessionCredentials
@RetryTranslated public software.amazon.awssdk.services.sts.model.Credentials requestSessionCredentials(long duration, TimeUnit timeUnit) throws IOException Request a set of session credentials.- Parameters:
duration- duration of the credentialstimeUnit- time unit of duration- Returns:
- the role result
- Throws:
IOException- on a failure of the request
-
requestRole
@RetryTranslated public software.amazon.awssdk.services.sts.model.Credentials requestRole(String roleARN, String sessionName, String policy, long duration, TimeUnit timeUnit) throws IOException Request a set of role credentials.- Parameters:
roleARN- ARN to requestsessionName- name of the sessionpolicy- optional policy; "" is treated as "none"duration- duration of the credentialstimeUnit- time unit of duration- Returns:
- the role result
- Throws:
IOException- on a failure of the request
-