|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.auth.profile.ProfileCredentialsProvider
public class ProfileCredentialsProvider
Credentials provider based on AWS configuration profiles. This provider vends AWSCredentials from the profile configuration file for the default profile, or for a specific, named profile.
AWS credential profiles allow you to share multiple sets of AWS security credentials between different tools like the AWS SDK for Java and the AWS CLI.
See http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
ProfilesConfigFile
Constructor Summary | |
---|---|
ProfileCredentialsProvider()
Creates a new profile credentials provider that returns the AWS security credentials configured for the default profile. |
|
ProfileCredentialsProvider(ProfilesConfigFile profilesConfigFile,
String profileName)
Creates a new profile credentials provider that returns the AWS security credentials for the specified profiles configuration file and profile name. |
|
ProfileCredentialsProvider(String profileName)
Creates a new profile credentials provider that returns the AWS security credentials configured for the named profile. |
|
ProfileCredentialsProvider(String profilesConfigFilePath,
String profileName)
Creates a new profile credentials provider that returns the AWS security credentials for the specified profiles configuration file and profile name. |
Method Summary | |
---|---|
AWSCredentials |
getCredentials()
Returns AWSCredentials which the caller can use to authorize an AWS request. |
void |
refresh()
Forces this credentials provider to refresh its credentials. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProfileCredentialsProvider()
public ProfileCredentialsProvider(String profileName)
profileName
- The name of a local configuration profile.public ProfileCredentialsProvider(String profilesConfigFilePath, String profileName)
profilesConfigFilePath
- The file path where the profile configuration file is located.profileName
- The name of a configuration profile in the specified
configuration file.public ProfileCredentialsProvider(ProfilesConfigFile profilesConfigFile, String profileName)
profilesConfigFile
- The profile configuration file containing the profiles used by
this credentials provider.profileName
- The name of a configuration profile in the specified
configuration file.Method Detail |
---|
public AWSCredentials getCredentials()
AWSCredentialsProvider
getCredentials
in interface AWSCredentialsProvider
public void refresh()
AWSCredentialsProvider
refresh
in interface AWSCredentialsProvider
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |