Interface InstanceProfileCredentialsProvider.Builder
- All Superinterfaces:
- Buildable,- CopyableBuilder<InstanceProfileCredentialsProvider.Builder,,- InstanceProfileCredentialsProvider> - HttpCredentialsProvider.Builder<InstanceProfileCredentialsProvider,,- InstanceProfileCredentialsProvider.Builder> - SdkBuilder<InstanceProfileCredentialsProvider.Builder,- InstanceProfileCredentialsProvider> 
- Enclosing class:
- InstanceProfileCredentialsProvider
public static interface InstanceProfileCredentialsProvider.Builder
extends HttpCredentialsProvider.Builder<InstanceProfileCredentialsProvider,InstanceProfileCredentialsProvider.Builder>, CopyableBuilder<InstanceProfileCredentialsProvider.Builder,InstanceProfileCredentialsProvider>  
A builder for creating a custom a 
InstanceProfileCredentialsProvider.- 
Method SummaryModifier and TypeMethodDescriptionbuild()Build aInstanceProfileCredentialsProviderfrom the provided configuration.profileFile(Supplier<ProfileFile> profileFileSupplier) Define the mechanism for loading profile files.profileFile(ProfileFile profileFile) Configure the profile file used for loading IMDS-related configuration, like the endpoint mode (IPv4 vs IPv6).profileName(String profileName) Configure the profile name used for loading IMDS-related configuration, like the endpoint mode (IPv4 vs IPv6).Configure the amount of time before the moment of expiration of credentials for which to consider the credentials to be stale.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuildercopyMethods inherited from interface software.amazon.awssdk.auth.credentials.HttpCredentialsProvider.BuilderasyncCredentialUpdateEnabled, asyncThreadName, endpoint, sourceChainMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilderapplyMutation
- 
Method Details- 
profileFileConfigure the profile file used for loading IMDS-related configuration, like the endpoint mode (IPv4 vs IPv6).By default, ProfileFile.defaultProfileFile()is used.- See Also:
 
- 
profileFileDefine the mechanism for loading profile files.- Parameters:
- profileFileSupplier- Supplier interface for generating a ProfileFile instance.
- See Also:
 
- 
profileNameConfigure the profile name used for loading IMDS-related configuration, like the endpoint mode (IPv4 vs IPv6).By default, ProfileFileSystemSetting.AWS_PROFILEis used.
- 
staleTimeConfigure the amount of time before the moment of expiration of credentials for which to consider the credentials to be stale. A higher value can lead to a higher rate of request being made to the Amazon EC2 Instance Metadata Service. The default is 1 sec.Increasing this value to a higher value (10s or more) may help with situations where a higher load on the instance metadata service causes it to return 503s error, for which the SDK may not be able to recover fast enough and returns expired credentials. - Parameters:
- duration- the amount of time before expiration for when to consider the credentials to be stale and need refresh
 
- 
buildBuild aInstanceProfileCredentialsProviderfrom the provided configuration.- Specified by:
- buildin interface- Buildable
- Specified by:
- buildin interface- HttpCredentialsProvider.Builder<InstanceProfileCredentialsProvider,- InstanceProfileCredentialsProvider.Builder> 
- Specified by:
- buildin interface- SdkBuilder<InstanceProfileCredentialsProvider.Builder,- InstanceProfileCredentialsProvider> 
- Returns:
- an instance of T
 
 
-