Package org.apache.hadoop.fs.s3a.auth
Class STSClientFactory
java.lang.Object
org.apache.hadoop.fs.s3a.auth.STSClientFactory
Factory for creating STS Clients.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSTS client connection with retries. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic software.amazon.awssdk.services.sts.StsClientBuilderbuilder(org.apache.hadoop.conf.Configuration conf, String bucket, software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentials) Create the builder ready for any final configuration options.static software.amazon.awssdk.services.sts.StsClientBuilderbuilder(org.apache.hadoop.conf.Configuration conf, String bucket, software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentials, String stsEndpoint, String stsRegion) Create the builder ready for any final configuration options.static software.amazon.awssdk.services.sts.StsClientBuilderbuilder(software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentials, org.apache.hadoop.conf.Configuration conf, String stsEndpoint, String stsRegion, String bucket) Create the builder ready for any final configuration options.static STSClientFactory.STSClientcreateClientConnection(software.amazon.awssdk.services.sts.StsClient stsClient, Invoker invoker) Create an STS Client instance.
-
Constructor Details
-
STSClientFactory
public STSClientFactory()
-
-
Method Details
-
builder
public static software.amazon.awssdk.services.sts.StsClientBuilder builder(org.apache.hadoop.conf.Configuration conf, String bucket, software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentials) throws IOException Create the builder ready for any final configuration options. Picks up connection settings from the Hadoop configuration, including proxy secrets. The endpoint comes from the configuration optionsDelegationConstants.DELEGATION_TOKEN_ENDPOINTandDelegationConstants.DELEGATION_TOKEN_REGION- Parameters:
conf- Configuration to act as source of options.bucket- Optional bucket to use to look up per-bucket proxy secretscredentials- AWS credential chain to use- Returns:
- the builder to call
build() - Throws:
IOException- problem reading proxy secrets
-
builder
public static software.amazon.awssdk.services.sts.StsClientBuilder builder(org.apache.hadoop.conf.Configuration conf, String bucket, software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentials, String stsEndpoint, String stsRegion) throws IOException Create the builder ready for any final configuration options. Picks up connection settings from the Hadoop configuration, including proxy secrets.- Parameters:
conf- Configuration to act as source of options.bucket- Optional bucket to use to look up per-bucket proxy secretscredentials- AWS credential chain to usestsEndpoint- optional endpoint "https://sns.us-west-1.amazonaws.com"stsRegion- AWS recommend setting the endpoint instead.- Returns:
- the builder to call
build() - Throws:
IOException- problem reading proxy secrets
-
builder
public static software.amazon.awssdk.services.sts.StsClientBuilder builder(software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentials, org.apache.hadoop.conf.Configuration conf, String stsEndpoint, String stsRegion, String bucket) throws IOException Create the builder ready for any final configuration options. Picks up connection settings from the Hadoop configuration, including proxy secrets.- Parameters:
conf- AWS configuration.credentials- AWS credential chain to usestsEndpoint- optional endpoint "https://sns.us-west-1.amazonaws.com"stsRegion- the region, e.g "us-west-1". Must be set if endpoint is.bucket- bucket name- Returns:
- the builder to call
build() - Throws:
IOException- problem reading proxy secrets
-
createClientConnection
public static STSClientFactory.STSClient createClientConnection(software.amazon.awssdk.services.sts.StsClient stsClient, Invoker invoker) Create an STS Client instance.- Parameters:
stsClient- STS instanceinvoker- invoker to use- Returns:
- an STS client bonded to that interface.
-