Class StsAssumeRoleWithSamlCredentialsProvider.Builder
- java.lang.Object
-
- software.amazon.awssdk.services.sts.auth.StsCredentialsProvider.BaseBuilder<StsAssumeRoleWithSamlCredentialsProvider.Builder,StsAssumeRoleWithSamlCredentialsProvider>
-
- software.amazon.awssdk.services.sts.auth.StsAssumeRoleWithSamlCredentialsProvider.Builder
-
- All Implemented Interfaces:
Buildable,CopyableBuilder<StsAssumeRoleWithSamlCredentialsProvider.Builder,StsAssumeRoleWithSamlCredentialsProvider>,SdkBuilder<StsAssumeRoleWithSamlCredentialsProvider.Builder,StsAssumeRoleWithSamlCredentialsProvider>
- Enclosing class:
- StsAssumeRoleWithSamlCredentialsProvider
@NotThreadSafe public static final class StsAssumeRoleWithSamlCredentialsProvider.Builder extends StsCredentialsProvider.BaseBuilder<StsAssumeRoleWithSamlCredentialsProvider.Builder,StsAssumeRoleWithSamlCredentialsProvider>
A builder (created byStsAssumeRoleWithSamlCredentialsProvider.builder()) for creating aStsAssumeRoleWithSamlCredentialsProvider.
-
-
Constructor Summary
Constructors Constructor Description Builder(StsAssumeRoleWithSamlCredentialsProvider provider)
-
Method Summary
-
Methods inherited from class software.amazon.awssdk.services.sts.auth.StsCredentialsProvider.BaseBuilder
asyncCredentialUpdateEnabled, prefetchTime, staleTime, stsClient
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation
-
-
-
-
Constructor Detail
-
Builder
public Builder(StsAssumeRoleWithSamlCredentialsProvider provider)
-
-
Method Detail
-
refreshRequest
public StsAssumeRoleWithSamlCredentialsProvider.Builder refreshRequest(AssumeRoleWithSamlRequest assumeRoleWithSamlRequest)
Configure theAssumeRoleWithSamlRequestthat should be periodically sent to the STS service to update the session token when it gets close to expiring.- Parameters:
assumeRoleWithSamlRequest- The request to send to STS whenever the assumed session expires.- Returns:
- This object for chained calls.
-
refreshRequest
public StsAssumeRoleWithSamlCredentialsProvider.Builder refreshRequest(Supplier<AssumeRoleWithSamlRequest> assumeRoleWithSamlRequestSupplier)
Similar torefreshRequest(AssumeRoleWithSamlRequest), but takes aSupplierto supply the request to STS.- Parameters:
assumeRoleWithSamlRequestSupplier- A supplier- Returns:
- This object for chained calls.
-
refreshRequest
public StsAssumeRoleWithSamlCredentialsProvider.Builder refreshRequest(Consumer<AssumeRoleWithSamlRequest.Builder> assumeRoleWithSamlRequest)
Similar torefreshRequest(AssumeRoleWithSamlRequest), but takes a lambda to configure a newAssumeRoleWithSamlRequest.Builder. This removes the need to calledAssumeRoleWithSamlRequest.builder()andStsRequest.Builder.build().
-
sourceChain
public StsAssumeRoleWithSamlCredentialsProvider.Builder sourceChain(String sourceChain)
Configure the source of this credentials provider. This is used for business metrics tracking to identify the credential provider chain.Note: This method is primarily intended for use by AWS SDK internal components and should not be used directly by external users.
- Parameters:
sourceChain- The source identifier for business metrics tracking.- Returns:
- This object for chained calls.
-
build
public StsAssumeRoleWithSamlCredentialsProvider build()
Description copied from class:StsCredentialsProvider.BaseBuilderBuild the credentials provider using the configuration applied to this builder.- Specified by:
buildin interfaceBuildable- Specified by:
buildin interfaceSdkBuilder<StsAssumeRoleWithSamlCredentialsProvider.Builder,StsAssumeRoleWithSamlCredentialsProvider>- Overrides:
buildin classStsCredentialsProvider.BaseBuilder<StsAssumeRoleWithSamlCredentialsProvider.Builder,StsAssumeRoleWithSamlCredentialsProvider>
-
-