AwsCredentialsProvider
@Immutable public class ProfileAssumeRoleCredentialsProvider extends Object implements AwsCredentialsProvider
BasicProfile
. If a profile defines the role_arn property then the profile
is treated as an assume role profile. Does basic validation that the role exists and the source (long lived) credentials are
valid.Constructor | Description |
---|---|
ProfileAssumeRoleCredentialsProvider(ProfileCredentialsService profileCredentialsService,
AllProfiles allProfiles,
BasicProfile profile) |
Modifier and Type | Method | Description |
---|---|---|
AwsCredentials |
getCredentials() |
Returns
AwsCredentials that can be used to authorize an AWS request. |
String |
toString() |
public ProfileAssumeRoleCredentialsProvider(ProfileCredentialsService profileCredentialsService, AllProfiles allProfiles, BasicProfile profile)
public AwsCredentials getCredentials()
AwsCredentialsProvider
AwsCredentials
that can be used to authorize an AWS request. Each implementation of AWSCredentialsProvider
can chose 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.
getCredentials
in interface AwsCredentialsProvider
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.