Class ProfileCredentialsUtils
- java.lang.Object
-
- software.amazon.awssdk.auth.credentials.internal.ProfileCredentialsUtils
-
public final class ProfileCredentialsUtils extends Object
Utility class to loadcredentialsProvider()
configured in a profile.
-
-
Constructor Summary
Constructors Constructor Description ProfileCredentialsUtils(ProfileFile profileFile, Profile profile, Function<String,Optional<Profile>> credentialsSourceResolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<AwsCredentialsProvider>
credentialsProvider()
Retrieve the credentials provider for which this profile has been configured, if available.
-
-
-
Method Detail
-
credentialsProvider
public Optional<AwsCredentialsProvider> credentialsProvider()
Retrieve the credentials provider for which this profile has been configured, if available. If this profile is configured for role-based credential loading, the returnedAwsCredentialsProvider
implementsSdkAutoCloseable
and should be cleaned up to prevent resource leaks in the event that multiple credentials providers will be created.
-
-