Interface AwsCredentialsProvider
- All Superinterfaces:
IdentityProvider<AwsCredentialsIdentity>
- All Known Subinterfaces:
HttpCredentialsProvider
- All Known Implementing Classes:
AnonymousCredentialsProvider,AwsCredentialsProviderChain,ContainerCredentialsProvider,DefaultCredentialsProvider,EnvironmentVariableCredentialsProvider,InstanceProfileCredentialsProvider,LazyAwsCredentialsProvider,ProcessCredentialsProvider,ProfileCredentialsProvider,SsoCredentialsProvider,StaticCredentialsProvider,StsAssumeRoleCredentialsProvider,StsAssumeRoleWithSamlCredentialsProvider,StsAssumeRoleWithWebIdentityCredentialsProvider,StsCredentialsProvider,StsGetFederationTokenCredentialsProvider,StsGetSessionTokenCredentialsProvider,StsWebIdentityTokenFileCredentialsProvider,SystemPropertyCredentialsProvider,SystemSettingsCredentialsProvider,WebIdentityTokenFileCredentialsProvider
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface AwsCredentialsProvider
extends IdentityProvider<AwsCredentialsIdentity>
Interface for loading
AwsCredentials that are used for authentication.
Commonly-used implementations include StaticCredentialsProvider for a fixed set of credentials and the
DefaultCredentialsProvider for discovering credentials from the host's environment. The AWS Security Token
Service (STS) client also provides implementations of this interface for loading temporary, limited-privilege credentials from
AWS STS.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Class<AwsCredentialsIdentity> Retrieve the class of identity this identity provider produces.ReturnsAwsCredentialsthat can be used to authorize an AWS request.default CompletableFuture<AwsCredentialsIdentity> resolveIdentity(ResolveIdentityRequest request) Resolve the identity from this identity provider.Methods inherited from interface software.amazon.awssdk.identity.spi.IdentityProvider
resolveIdentity, resolveIdentity
-
Method Details
-
resolveCredentials
AwsCredentials resolveCredentials()ReturnsAwsCredentialsthat can be used to authorize an AWS request. Each implementation of AWSCredentialsProvider can choose its own strategy for loading credentials. For example, an implementation might load credentials from an existing key management system, or load new credentials when credentials are rotated.If an error occurs during the loading of credentials or credentials could not be found, a runtime exception will be raised.
- Returns:
- AwsCredentials which the caller can use to authorize an AWS request.
-
identityType
Description copied from interface:IdentityProviderRetrieve the class of identity this identity provider produces. This is necessary for the SDK core to determine which identity provider should be used to resolve a specific type of identity.- Specified by:
identityTypein interfaceIdentityProvider<AwsCredentialsIdentity>
-
resolveIdentity
Description copied from interface:IdentityProviderResolve the identity from this identity provider.- Specified by:
resolveIdentityin interfaceIdentityProvider<AwsCredentialsIdentity>- Parameters:
request- The request to resolve an Identity
-