Class STSClientFactory.STSClient

java.lang.Object
org.apache.hadoop.fs.s3a.auth.STSClientFactory.STSClient
All Implemented Interfaces:
Closeable, AutoCloseable
Enclosing class:
STSClientFactory

public static final class STSClientFactory.STSClient extends Object implements Closeable
STS client connection with retries.
  • Method Details

    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      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 credentials
      timeUnit - 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 request
      sessionName - name of the session
      policy - optional policy; "" is treated as "none"
      duration - duration of the credentials
      timeUnit - time unit of duration
      Returns:
      the role result
      Throws:
      IOException - on a failure of the request