AwsCredentialsProvider
public class ProfileCredentialsProvider extends Object
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
Modifier and Type | Class | Description |
---|---|---|
static class |
ProfileCredentialsProvider.Builder |
A builder for creating a custom
ProfileCredentialsProvider . |
Constructor | Description |
---|---|
ProfileCredentialsProvider() |
Create a
ProfileCredentialsProvider using the default profile and configuration file. |
Modifier and Type | Method | Description |
---|---|---|
static ProfileCredentialsProvider.Builder |
builder() |
Get a builder for creating a custom
ProfileCredentialsProvider . |
AwsCredentials |
getCredentials() |
Returns
AwsCredentials that can be used to authorize an AWS request. |
String |
toString() |
public ProfileCredentialsProvider()
ProfileCredentialsProvider
using the default profile and configuration file. Use builder()
for
defining a custom ProfileCredentialsProvider
.public static ProfileCredentialsProvider.Builder builder()
ProfileCredentialsProvider
.public final 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.