public static final class StsWebIdentityTokenFileCredentialsProvider.Builder extends StsCredentialsProvider.BaseBuilder<StsWebIdentityTokenFileCredentialsProvider.Builder,StsWebIdentityTokenFileCredentialsProvider>
Modifier and Type | Method and Description |
---|---|
StsWebIdentityTokenFileCredentialsProvider |
build()
Build the credentials provider using the configuration applied to this builder.
|
StsWebIdentityTokenFileCredentialsProvider.Builder |
refreshRequest(AssumeRoleWithWebIdentityRequest assumeRoleWithWebIdentityRequest)
Configure the
AssumeRoleWithWebIdentityRequest that should be periodically sent to the STS service to update
the session token when it gets close to expiring. |
StsWebIdentityTokenFileCredentialsProvider.Builder |
refreshRequest(Consumer<AssumeRoleWithWebIdentityRequest.Builder> assumeRoleWithWebIdentityRequest)
Similar to
refreshRequest(AssumeRoleWithWebIdentityRequest) , but takes a lambda to configure a new AssumeRoleWithWebIdentityRequest.Builder . |
StsWebIdentityTokenFileCredentialsProvider.Builder |
refreshRequest(Supplier<AssumeRoleWithWebIdentityRequest> assumeRoleWithWebIdentityRequestSupplier)
Similar to
refreshRequest(AssumeRoleWithWebIdentityRequest) , but takes a Supplier to supply the
request to STS. |
StsWebIdentityTokenFileCredentialsProvider.Builder |
roleArn(String roleArn)
The Amazon Resource Name (ARN) of the IAM role that is associated with the Sts.
|
StsWebIdentityTokenFileCredentialsProvider.Builder |
roleSessionName(String roleSessionName)
Sets the role session name that should be used by this credentials provider.
|
void |
setRoleArn(String roleArn)
Sets Amazon Resource Name (ARN) of the IAM role that is associated with the Sts.
|
void |
setRoleSessionName(String roleSessionName)
Sets the role session name that should be used by this credentials provider.
|
void |
setWebIdentityTokenFile(Path webIdentityTokenFile) |
StsWebIdentityTokenFileCredentialsProvider.Builder |
stsClient(StsClient stsClient)
The Custom
StsClient that will be used to fetch AWS service credentials. |
StsWebIdentityTokenFileCredentialsProvider.Builder |
webIdentityTokenFile(Path webIdentityTokenFile)
Sets the absolute path to the web identity token file that should be used by this credentials provider.
|
asyncCredentialUpdateEnabled, prefetchTime, staleTime
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
copy
applyMutation
public StsWebIdentityTokenFileCredentialsProvider.Builder stsClient(StsClient stsClient)
StsClient
that will be used to fetch AWS service credentials.
stsClient
in class StsCredentialsProvider.BaseBuilder<StsWebIdentityTokenFileCredentialsProvider.Builder,StsWebIdentityTokenFileCredentialsProvider>
stsClient
- The STS client to use for communication with STS.
Make sure IdpCommunicationErrorException is retried in the retry policy for this client.
Make sure the custom STS client is closed when it is ready to be disposed.public StsWebIdentityTokenFileCredentialsProvider.Builder roleArn(String roleArn)
The Amazon Resource Name (ARN) of the IAM role that is associated with the Sts. If not provided this will be read from SdkSystemSetting.AWS_ROLE_ARN.
roleArn
- The Amazon Resource Name (ARN) of the IAM role that is associated with the Sts cluster.public void setRoleArn(String roleArn)
Sets Amazon Resource Name (ARN) of the IAM role that is associated with the Sts. By default this will be read from SdkSystemSetting.AWS_ROLE_ARN.
roleArn
- The Amazon Resource Name (ARN) of the IAM role that is associated with the Sts cluster.public StsWebIdentityTokenFileCredentialsProvider.Builder roleSessionName(String roleSessionName)
Sets the role session name that should be used by this credentials provider. By default this is read from SdkSystemSetting.AWS_ROLE_SESSION_NAME
roleSessionName
- role session name that should be used by this credentials providerpublic void setRoleSessionName(String roleSessionName)
Sets the role session name that should be used by this credentials provider. By default this is read from SdkSystemSetting.AWS_ROLE_SESSION_NAME
roleSessionName
- role session name that should be used by this credentials provider.public StsWebIdentityTokenFileCredentialsProvider.Builder webIdentityTokenFile(Path webIdentityTokenFile)
Sets the absolute path to the web identity token file that should be used by this credentials provider. By default this will be read from SdkSystemSetting.AWS_WEB_IDENTITY_TOKEN_FILE.
webIdentityTokenFile
- absolute path to the web identity token file that should be used by this credentials
provider.public void setWebIdentityTokenFile(Path webIdentityTokenFile)
public StsWebIdentityTokenFileCredentialsProvider.Builder refreshRequest(AssumeRoleWithWebIdentityRequest assumeRoleWithWebIdentityRequest)
AssumeRoleWithWebIdentityRequest
that should be periodically sent to the STS service to update
the session token when it gets close to expiring.assumeRoleWithWebIdentityRequest
- The request to send to STS whenever the assumed session expires.public StsWebIdentityTokenFileCredentialsProvider.Builder refreshRequest(Supplier<AssumeRoleWithWebIdentityRequest> assumeRoleWithWebIdentityRequestSupplier)
refreshRequest(AssumeRoleWithWebIdentityRequest)
, but takes a Supplier
to supply the
request to STS.assumeRoleWithWebIdentityRequestSupplier
- A supplierpublic StsWebIdentityTokenFileCredentialsProvider.Builder refreshRequest(Consumer<AssumeRoleWithWebIdentityRequest.Builder> assumeRoleWithWebIdentityRequest)
refreshRequest(AssumeRoleWithWebIdentityRequest)
, but takes a lambda to configure a new AssumeRoleWithWebIdentityRequest.Builder
. This removes the need to call AssumeRoleWithWebIdentityRequest.builder()
and AssumeRoleWithWebIdentityRequest.Builder#build()
.public StsWebIdentityTokenFileCredentialsProvider build()
StsCredentialsProvider.BaseBuilder
build
in interface Buildable
build
in interface SdkBuilder<StsWebIdentityTokenFileCredentialsProvider.Builder,StsWebIdentityTokenFileCredentialsProvider>
build
in class StsCredentialsProvider.BaseBuilder<StsWebIdentityTokenFileCredentialsProvider.Builder,StsWebIdentityTokenFileCredentialsProvider>
Copyright © 2022. All rights reserved.